Trie data structure for client based autocompletion