in above algo..little correction. move down every time you find 0 , and move right every time you find 1.
On Tue, Dec 27, 2011 at 3:42 PM, atul anand <[email protected]> wrote: > > start from first row i=0; > > move right until you find 1. > if you find 0 , say at index j ( arr[0][j] ), them one row down i.e at > row[1][j]and then move right. > > continue in this this fashion and keep track row at which latest '1' is > found. > > when you reach j=N...you will have the row index which has max number of > 1's > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
