NeetCode #295LC-1428MediumBinary Search
← Back to All Problems

#295 · #1428 · Leftmost Column with at Least a One(至少有一个 1 的最左端列)

📌 Problem Statement & Constraints

This is an interactive problem. A binary matrix has each row sorted in non-decreasing order. BinaryMatrix.get(row, col) returns a cell and dimensions() returns [rows, cols]. Return the index of the leftmost column containing at least one 1, or -1. You may call get at most 1000 times. Constraints: 1 <= rows, cols <= 100.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!