Can you please tell how to traverse all the branches after finding the query.. i sent the found query to a print func please help me after that
here:
i have corrected all your syntax errors in your code
further
In this problem you need to create a Trie data structure of all the words that are in the dictionary. Now, in queres, we need to just check the words which have the prefix same as given in input. And than we need to use DFS for getting all the possibilities of words. Thus the max words visited will be all the words in dictionary.
How do i traverse???