whts the question....??

With regards,

Praveen Raj
DCE-IT 3rd yr
9999735993
[email protected]



On Fri, Sep 9, 2011 at 12:17 PM, Amit Gupta <[email protected]> wrote:

> Guys, why don't we do something like this :
>
> 1. If (arrayHasBeenTraversed, Goto 4).
>    Else, Traverse the 2-D array [row,column] wise. Inspect element
> array[row][column]. Goto 2.
> 2. If you encounter a '1' (array[row][column]),
>    change all the 0's in the corresponding [row,column] to '-1'
>    Also, don't do anything if you encounter a '1'.
> 3. Goto 1.
> 4. Scan the array, change all '-1s' to 1s. Finish.
>
> Send your comment.
>
> Cheers,
> Amit
>
> --
> 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.
>
>

-- 
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.

Reply via email to