LeetCode 421 — find the maximum XOR pair in an array of integers in O(N times 32) using a binary trie. The classic introduction to bit-trie pattern that powers competitive programming and database query optimisers.
LeetCode 1707 — for each query (xi, mi), find max xi XOR nums[j] where nums[j] does not exceed mi. Sort queries by mi, sort nums, insert lazily into a binary trie, answer each query in O(32). The offline-trie pattern unlocks bounded XOR queries.
Map of every important trie variant you need for FAANG interviews — binary trie for XOR, reverse trie for suffix matching, counted trie for prefix scoring, offline trie for bounded queries, and the design patterns that compose them.