Change O(l) to O(k) in trie because O(l) looks too much like O(1)