Back to DSA sheet
Search a 2D Matrix
MediumBinary SearchSearch a value in an m x n matrix where each row is sorted and the first integer of each row is greater than the last of the previous row.
Constraints
- 1 <= m, n <= 100
- -10^4 <= matrix[i][j], target <= 10^4
Sheets
Blind 75Grind 75NeetCode 150NeetCode 250
search-a-2d-matrix.cpp
Loading editor
Custom input (stdin)
Output
Run your code to see its output.