searchingstringstrees
When is a trie worth its memory cost?
Anonymous
A trie shares prefixes between keys, which can make prefix lookup direct. The trade-off is extra node and pointer overhead; for a small dictionary, a sorted array may use less memory. Tries fit best when prefix queries are common and the alphabet is manageable.
0