Hi team, I am looking for the simple implementation of Tries Data Structure in C++ with some descriptions of code which will make it easier to understand.I have gone through several codes available on net but all of them are lacking description.If you have your own code, then pls provide the description of your code, otherwise, your code is useless for me.
Try reading online and if you understand the concept, following is my implementation in array (2D) which is faster than using actual tree (using malloc). Take a look and try to understand.
Let me know if you still have doubts
Also try this link : http://codeforces.com/blog/entry/13622
ok…I have done reading trie implementation in c++, but one simple question arises, how can I return the count of words present in the trie starting with
a prefix(here prefix being passed as an argument)?