Algorithm to find the mode in a unimodal array
Almost correct. Just a small correction. It should be 

if A[mid] &gt; a[mid+1]


If two consecutive elements are increasing then they are in the increasing portion of the array, so the mode is to the right. Hence the correction.