You should do a dfs from the node which matches the prefix say "abc". If its a word then print it.
On Thu, Jun 28, 2012 at 3:55 PM, deepikaanand <[email protected]>wrote: > It is not working..Even i tried to solve the problem using recursion > but it didnt work > > code :- > > http://ideone.com/UhTTx > > -- > 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.
