Why i am not getting the correct output


Also when I am increasing the count to 6 or 7 (no of words provided) it is magically providing the right ouput, (i have provided extra word “ducre”, and duches)

hello @great
u need to increment the frequency of children node in place of current node.
becuase temp is inicating parent node and we are cheking character of its children
for ur reference->