I ran the sample test case and 20 self made test cases for my code which are giving correct output. I can’t find the semantic error. Thanks in advance
My code-https://ide.codingblocks.com/s/99485
Ques- Digital Dictionary https://hack.codingblocks.com/contests/c/916/1560
You need to ignore the cases:
For eg, Pe and pe both are prefix to peter.
But, your program is failing to do so.
Hope, this would help.
still not working. I considered the cases
Hello,
It is not mentioned in the problem,
But you have to insert the string that is giving “No Suggestion” or that is not present in the dictionary, to the dictionary.
This would surely help.
Thanks for your concern
But this is already considered in line 84. We have to just output “No suggestion” and not append it in the dictionary.
Well, i didn’t ask you to append anything in the dictionary.
I suggested you to insert the string in the trie data structure that you have created, if you don’t find it as prefix in the trie.
I’ll correct your code and send you that.
Hello @sehaj_ps,
I apologize for replying late.
BTW, I have corrected your code.
Now, it’s passing all the testcases.
You can check it here.
Hope, i have solved your issue.
Give a like, if you are satisfied.
Thanks for that
Its not clear in the ques that whether we have have to print the answer that instant or save it and print later.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.
try to give original problem reference as your answer checker is worst