The problem statement is as follows:
Suppose that each row of an n x n array consists of 1's and 0's such that, in any row of A, all the 1's come before any of the 0's in that row. Describe a method to identify the row which has maximum number of 1's. Fairly straightforward right.
Yes, indeed it is. Now the catch here is you have to solve the above problem in O(n) time and not O(n2) time. This calls for some amount of thinking. All you algorithm buffs, this is not for you. I know this was the thing you solved first in the first course on algorithms.