A local maximum in a 2D array can be defined as a value such that all it\'s 4 neighbours are less than or equal to it, ie, for a[i][j] to be a local maximum,
a[i][j]
I believe this question can be answered using what is known as adversary arguments, which gives you a lower bound on the number of comparisons.
And in my opinion, you are right.. this would require atleast n^2 comparisons.