This question has more specification that the rows are sorted. It can be
easily solved then.
Otherwise its not solvable.

On Sat, Aug 20, 2011 at 3:04 PM, shady <sinv...@gmail.com> wrote:

> i wonder how is it possible because reading input itself takes O(m*n)
>
>
> On Sat, Aug 20, 2011 at 2:59 PM, Sanjay Rajpal <srn...@gmail.com> wrote:
>
>> Yes its O(m+n), but i dont know how :)
>> Thats y i posted it here.
>>
>>
>> Sanju
>> :)
>>
>>
>>
>> On Sat, Aug 20, 2011 at 2:28 AM, Naman Mahor <naman.ma...@gmail.com>wrote:
>>
>>> it is O(m+n). sure??
>>>
>>>   On Sat, Aug 20, 2011 at 2:52 PM, Sanjay Rajpal <srn...@gmail.com>wrote:
>>>
>>>>    We are given a 2-D array of 0s and 1s.
>>>> We have to determine which row contains maximum no. of 1s in the array
>>>> in O(m+n);
>>>> where m - no. of rows and n - no. of columns.
>>>>
>>>> Sanju
>>>> :)
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Algorithm Geeks" group.
>>>> To post to this group, send email to algogeeks@googlegroups.com.
>>>> To unsubscribe from this group, send email to
>>>> algogeeks+unsubscr...@googlegroups.com.
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Romil

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to