← ALL NOTES
Hash Table

208. Implement Trie (Prefix Tree)

Build a trie supporting insert, search (exact word), and startsWith (any word with this prefix). A trie is a tree where the path from the root spells a string — each node has up to 26 children, one…

Loading…