/counter

🔍 A word counter.

Primary LanguagePythonMIT LicenseMIT

Problem Statement

Read a huge file which has English words. Return the case-sensitive word count for the given word.


Solution

Create a Trie from the words in the given file. Store the occurance of the word at leaf of the Trie.


Visualization

Example. "hi hello world hello"


trie