I am getting wrong answer against all test cases. I am not understanding why.
[Python 3] wrong answer
@v.a
One error in the code is that you did not add the prefix to the trie if No suggestions were found. It is explicitly mentioned. Please perform that step.
If my answer is able to resolve your doubt, please mark the query as resolved.
The fix you suggested helped me. But only test case 0,1,2 are passing. Testcase 3,4 are still failing