Why do we need Trie? Can we simply shard on the basis of whole word?


#1

When we are storing the list of top 5 words with every prefix character so we can also store the whole prefix string seperately