Search
⌘K

Leetcode 1901. Find a Peak Element II

Given an m x n matrix where adjacent cells differ, find any cell that is strictly greater than its up/down/left/right neighbors (a 2D peak). Do this in O(m log n) or O(n log m) time — typically via divide-and-conquer/binary search across rows or columns to locate a peak.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.