Using HashMap for Trie