View Single Post
  #1 (permalink)  
Old September 27th, 2007, 01:33 AM
raju_1230 raju_1230 is offline
Registered User
 
Join Date: Sep 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to raju_1230
Default DEAPTH FIRSH SEARCH help

I need program of
DEAPTH FIRSH SEARCH







                                     s ---------- level 0
                                   / \
                               a b -----------level 1
                              / \ / c d e f ------------level 2


  in the above tree s has two children 'a' and 'b' where as 'a' has again two children 'c' and 'd' . ' b' has two children 'e' and 'f', and the proceeds so on.


DEAPTH FIRSH SEARCH
       in this we take one node and teh take its left child first, and to taht node its left child and so on. and if came to bottom then again we go at top and start from the node which is untouched
  for the above tree Deapth first search is
                    sacdbef.

  so if the goal is d then dfs is sacd




rAjU
Reply With Quote