@Saurabh.... DFS Should Work Here, Start from any room i , visit next room 
connected to it .. then to this room  & so on , once you back track you 
will back to the starting node ,this way you can find out .min.umber of 
room he need to visit will be 2 times of traversal isn't it ?


posting the soln in hurry :), i know may have some bugs , will discuss 
after some time.

Thanks
Shashank

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/El6uttSxuA0J.
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