Getting wrong answer

This code is giving wrong answer
link to code->https://ide.codingblocks.com/s/610713

Hi… what problem are u facing??

I have implemented this code to print smallest unique prefix of an array of strings using concept of tries but it is giving me wrong answer. I think there is some problem with alloting frequencies to node while inserting string in tries. but i am not sure. most of the time, it just prints upto 1 or 2 chars of all strings

I have dry run the code. Insert function seems to be working fine…please check find prefix function

okay… let me see…

Did you get what is wrong with this code? prefix function is making some unwanted changes

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.