Advanced DS without the trie search