Leetcode 1428. Leftmost Column with at Least a One
Given a binary matrix where each row is sorted non-decreasing (all 0s before 1s) and you can only query entries via a provided API, find the leftmost column index that contains at least one 1 (or return -1 if none), optimizing for minimal queries/time. The key is to exploit the row-sorted property to avoid scanning the whole matrix.
Asked at:
Uber
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Late June, 2026
Uber
Mid-level
Given a 2-dimensional array where every row may contain only 0s and 1s sorted in ascending order, return the index of the first column that contains a 1.
Early June, 2026
Uber
Mid-level
Hello Interview Premium
Your account is free and you can post anonymously if you choose.