trie, - .
(a-z, 0-9, _, . ..), trieNode . topcoder trie - , trie.
, trie.
Search / comparison takes O (l) time, where l is the length of the string you are comparing.
Sorting requires that you cross all trietodes of the trie tree using DFS (depth first search) - O (| V | + | E |).
hIpPy source
share