1
We are given an array $a$ of $n$ integers, such that the difference between each element $a[i]$ and the adjacent elements $a[i-1]$ and $a[i+1]$ is at most $1$. Define a root of $a$ as an index $k$ in $1,\ldots,n$ such that $a[k]=0$. If $a[1]<0$ and $a[n]>0$, then $a$ has at least one root. Moreov...