dsa8 min read
Search a 2D Matrix II — Staircase Search O(m+n) [LC 240]
Search a row-and-column sorted 2D matrix in O(m+n) using the staircase technique from the top-right corner. Understand why binary search alone fails and why the corner is the unique elimination point.
Read →