Trie
A Trie, or prefix tree, stores strings character by character along paths from the root. Nodes represent prefixes, and terminal markers identify complete words. Tries are useful when prefix operations are important, such as autocomplete, dictionary lookup, spell checking, routing tables, and prefix-based search.
Insert a string of length L: O(L).
Search a string of length L: O(L).
Prefix search: O(P), excluding output traversal.
Performance depends on alphabet representation and memory usage.
Tries are especially effective for autocomplete and prefix queries.