Can you tell my mistake?

hello @vageesha

a) u should increment the frequency of child node and not parent node

b) when u are printing u need to keep track of all characters starting from root to the node with 1 frequency

for ur reference-> https://ide.codingblocks.com/s/483447

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.