Build a simple autocomplete application based on a Trie data structure.
Fork this repository to implement your solution. The functionality you provide must adhere to the following interface:
add(word)
=> adds word to the trie, returningtrue
if the word was successfully added andfalse
if the word was already present.contains(word)
=> returnstrue
if the trie contains word andfalse
if it does not.search(prefix)
=> returns the list of all words in the trie that begin with prefix.
You may use any language you wish for this task - use whatever you are most comfortable in.
When you are finished, submit a pull request containing your solution. Be sure that your solution contains instructions on how to execute the above commands.