C trie implementation