Problem 2387 · Medium

Median of a Row Wise Sorted Matrix

Binary search on the value; count elements at most mid in each sorted row until the smallest qualifying value remains.

Open the interactive visualisation