Test cases not passing

Example test case passing. Rest is not passing.
Kindly find the error in the code.

It is given in the question if some prefi doesnot exists in your dictionary then add it to the dictionary.

1 Like

You may still get wrong answer, because in the question it is given that print them in Lexicograpical order but u have used unordered_map which will cause the problem.

Just a suggestion,Try to develop a habbit of carefully reading even the minute details given in the questions, because many times you will see that these minute details are the way to optimize our solution.

I Hope it helps.

1 Like

Okay noted. Thank you