dsastrings
When is a trie worth the extra memory?
Anonymous
A trie can make prefix lookup direct: each edge consumes one character, so a query follows only the prefix length. The trade-off is memory for nodes and edges, especially when many prefixes share little. For a small vocabulary or exact lookups, a hash map may be simpler.
0