Staircase Search in a Sorted 2D Matrix

Given an m × n integer matrix matrix and an integer target, determine whether target exists in the matrix.

The matrix has the following properties:

  • Each row is sorted in non-decreasing ord...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: