Digital Dictionary

Why is it failing the test cases?

https://ide.codingblocks.com/s/298723 Why is it failing the test cases?

https://ide.codingblocks.com/s/298723 Why is it failing the test cases?

Sorry for responsing late. I am no moderator!!
Few mistakes are there:
1-Words should be lexicographic output(map is required not unordered map)
2-if you dont find a word you need to add it so that in next search it gets shown
3-Uppercase/Lowercase dont matter here P is also prefix array of pet
Work on these on your code. Hope it helps!


I have made required changes in your code. First try yourself fixing the 3 errors, if feeling difficult then see your corrected code.
Happy Coding!!

@Karanveer what’s your doubt