The code in this video is not working for sorted array only

its giving -1 but i think it should give the maximum element of the array.
is pivot meaningless for a sorted array???