Build a simple autocomplete application based on a Trie data structure.
Create an implementation of a Trie, implementing the algorithms required to support the following interface:
add(word)=> adds word to the trie, returningtrueif the word was successfully added andfalseif the word was already present.contains(word)=> returnstrueif the trie contains word andfalseif it does not.search(prefix)=> returns the list of all words in the trie that begin with prefix.
- The trie implementation only needs to support lowercase words
- Clever solutions are welcome and encouraged
- Implement in a language of your choice
- Include instructions as to how to run your solution
- A User Interface is not required for successful completion of this task (no penalty if you include one, however)
Fork this repository to implement your solution. When you are finished, submit a pull request containing your Trie implementation and any supporting code.