1. start from top to bottom, left to right, check each cell one by one. If
current location is already labelled, then label the locations stored
previously in the path with that label. Then clear the path vector and
continue step 1.
2. otherwise, check north, west, east, south neighbour and get the minimum
location (x_min, y_min)
3a. if min location is different from current location, then push/store
current location into the path vector and proceed to step 1 with the min
location.
3b. otherwise, meaning current location is a sink, label it with next
char C' and also label all locations stored previously in the path vector
with C'.

On Fri, Sep 4, 2009 at 7:37 PM, CodeJunky <[email protected]>wrote:

>
> Can anyone please explain me the water shed problem and the graph
> approach
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-codejam" 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/google-code?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to