I have this Trie:
a
/ \
b c
/ \ \
t y u
2 5 3
numbers at leaf stands for frequency, stored at the terminal node
and I have default Trie search function to search for a string. When I do search('a'), it'll return aby since it is the most frequently inserted string. Frequency is stored by self.count in my function.
I'd prefer not to post my code.
How would you approach solving and returning the nodes from a to y?
Thank you in advance.