Digital Dictionary

Please help…Unable to find out the problem in my dfs function

https://ide.codingblocks.com/s/195877 updated code…

Hi , I`ll let u know the error give me some time

1 Like

bhot choti galti
2nd walla for loop had to run for (int i = 0 ; i < k ; i++)

also ekh condition h ki incase the word is not present in the dictionary add it…


made changes in int main part only

1 Like

Ok…is the code correct enough now to get submitted??

u can try man! in case of furhter error ( in case any tell me)

1 Like

no test case passed…please now what the problem is…

Hi ,
we had not read the output constraint
the output should be in lexographic increasing order add all stirng in vec, sort the vector and print it
in case no string is found print “No suggestion”

this code gives all correct

ok…i will try doing it

instead of using a vector to store the output, we can also use ordered map to implement the trie. The dfs will give sorted output.