If arr [ mid ] is greater than the next element and smaller than the previous element then maximum lies on left side of mid
if ( $ arr [ $ mid ] > $ arr [ $ mid + 1 ] && $ arr [ $ mid ] < $ arr [ $ mid - 1 ] ) return findMaximum ( $ arr , $ low , $ mid - 1 ) ;