Problem 1901 · Medium

Find a Peak Element II

Find any cell in a matrix that is strictly greater than all of its orthogonal neighbours. The visual splits the grid by its middle column, picks the maximum there, and shows the comparisons that narrow the search.

Open the interactive visualisation