Problem 1198 · Medium

Find Smallest Common Element in All Rows

Keep one pointer per sorted row; when the pointers disagree, the largest value rules out smaller front values, until every row shows the same value.

Open the interactive visualisation