Advanced
Tries & Bit Manipulation
Prefix trees for autocomplete, wildcard and board word searches, plus the bit tricks (XOR, masks, x & (x - 1)) that turn tricky problems into one-liners.
0 of 3 lessons complete, 0 of 8 problems solved
Coursework
40 min
Up next
Tries: Prefix Trees
Store words letter by letter so every prefix question costs O(length of the word).
12 min
Bit Manipulation Tricks
Read, set and clear bits, cancel pairs with XOR and enumerate subsets with masks.
14 min
Trie Searches, XOR Tries & Interview Day
Wildcard and grid searches over a trie, a binary trie for max XOR, and your interview checklist.
14 min
Practice ladder
Start with the first problem, then work toward the harder variations. Run examples before submitting against all tests.