I am not able to figure out the problem in my approach, could you please help, it is giving correct output in given test cases
What is the problem in my code?
you can check the corrected code here: https://ide.codingblocks.com/s/209619
the main issue was you missed this line of question:
βAnd if no such words are available for a given search word, add this word to your dictionary.β last line of problem statement.
thanks