← Amazon questions

Find row with maximum 1s in 2D Boolean array

Filed under Amazon

Given a 2D boolean array (matrix) where each row is sorted in non-decreasing order, find the 0-indexed position of the row that contains the maximum number of 1s. If multiple rows have the same…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.