Given a 2D array of size N x M consisting only of 0s and 1s, where each row is sorted such that all 0s appear before 1s, find the index of the row that contains the maximum number of 1s optimally.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.