Trie implementation

Can somebody please help with this implementation of trie. I am just inserting certain words and checking if any given word is present in trie or not. The output displayed on the link depicts the problem. There seems to be a problem with line 55 and so… but I am unable to get it!!

Please help!

A bit improve , try using like void init(struct trie *&t) and other functions and simply pass t. post after that, I will look after the contest.

If i’ll simply pass t, then how’ll modification occur as i need to pass the reference as I am modifying the count in insert function. However, i did in search function as it doesn’t require any change, but it still gives the same.

Here is my easy implementation of trie

1 Like

A clean code indeed! But can you still point out the mistake in my code… That would really help!

//