Hi all,
The third solution is... (I hope there will not be any fourth ;) )

Two BFSs...

1. The first BFS will traverse all unlocked nodes (same as solution one)...
2. The second BFS will traverse until one locked node is encountered.

Hey, guys... this is boring...
It is always possible to convert between DFS and BFS.
It is just about time complexity..

As we know...
2 BFSs work better.

Regards,
Prunthaban



--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to