Implement operations for an AutoComplete feature.
- InsertWords(words) - Given a stream of words, store the words
- CheckPrefix(prefix) - Returns if the prefix exists
- SearchPrefix(prefix) Given a prefix string, return words starting with the prefix string.
Eg: Insert Words {car, cart, carpool, bus, apple, cargo}
SearchPrefix (car) -> car, cart, carpool, cargo
Follow up questions – SearchPrefix() return in sorted order/ top k results