Trie — Reasoning Check

Reason about shared prefixes, branching search, board paths, and alphabet contracts.


Get every question correct to pass this checkpoint. You can review feedback, revise your answers, and submit again.

1. Starting from an empty trie, insert to, top, and ton. How many non-root trie nodes are needed when each edge consumes one letter?
2. A word dictionary contains mint, mine, mild, and mile. How many of those stored words match the pattern .i.e, where each dot matches exactly one letter?
3. A wildcard dictionary stores sun and top. Searching .op tries the s branch first, fails there, and returns false without trying t. What correction is required?

Select one answer.

4. Word Search II uses the board rows no / on and dictionary [no,non,noon]. Which result set satisfies four-direction movement, no cell reuse within a path, and distinct-word output?

Select one answer.

5. Replace Words uses roots [therm,the,th,else] and sentence "thermal theory other". What is returned?

Select one answer.

6. To support arbitrary Unicode, a developer changes a trie’s byte loop to range over runes but keeps children[26] indexed by rune-'a'. What is still wrong?

Select one answer.

Join Discord