Leetcode 74. Search a 2D Matrix
Given an m×n matrix where each row is sorted and the first element of each row is greater than the last of the previous row, determine whether a target exists in the matrix. Exploit the matrix's global sorted order to perform an O(log(m*n)) binary search (treating it as a flattened 1D sorted array).
Asked at:
AmazonMotive
Meta
M
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Early June, 2026
Senior
Late May, 2025
Meta
Senior
Late April, 2025
M
Mid-level
Hello Interview Premium
Your account is free and you can post anonymously if you choose.