The staircase: one line per step.
transcript
A grid is sorted both ways. A flat search fails. Start in a corner.
Count entries at most eight. The corner holds eleven. Too big. So its whole column is too big. Move left.
Seven fits. So everything left of it fits. Count them all. Then go down.
Fits: count the row, go down. Too big: drop the column, go left.
Nine is too big. So the whole column below is too big. Move left one column. Six fits. Count its row, and go down a row.
The top-right entry is the largest in its row. It is the smallest in its column. So one comparison decides a whole line.
Reading every entry takes a million steps. A search in each row takes ten thousand. The staircase takes about a thousand.
Every step removes a row or a column. So the walk is at most m plus n. Full breakdown in the lecture.