INTERESTING TRIE PROBLEM HELP

Revision en2, by aman_naughty, 2019-01-25 16:47:57

problem link : LINK

submission link : code

I am adding words to the trie and while adding i also store at each node the lexicographically largest encrypted code encountered till now in it. As the encrypted code is unique for all the strings I maintain a hashmap with key=encrypted string and value = original string Then for any query my answer is simply the number of vowels in the original string found after searching the prefix in trie. Why is my code giving wrong answer. Can someone provide some test cases where this fails??

Tags trie, #data structure, #contest, #strings

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English aman_naughty 2019-01-25 16:48:32 39 Tiny change: ' fails??\n' -> ' fails??\n\nP.S. why are people downvoting this\n'
en2 English aman_naughty 2019-01-25 16:47:57 48 Tiny change: '\nproblem li' -> 'problem li'
en1 English aman_naughty 2019-01-24 23:56:03 685 Initial revision (published)