DSAAdvancedReady

Specialized Structures and Production DSA Assessment

This assessment verifies the Specialized Structures and Production DSA module. Passing it contributes up to 15 points in the 86-100 score band.

Questions

8

Limit

120m

Pass

85%

Score

+15

Question 1scenarioAdvanced

13 pts

Prefix-system structure selection

A command palette has 8,000 mostly static commands and must show up to 5 suggestions after each keystroke. Compare a trie with a sorted array plus binary search. Which would you choose first, and what would make you switch?

Question 2codingAdvanced

14 pts

Trie DFS with wildcard branching

Design `WordDictionary` with `addWord(word)` and `search(pattern)` where `.` matches any single character. Explain how the wildcard changes trie search complexity.

Question 3scenarioAdvanced

14 pts

Mutable range-query design

A revenue dashboard answers arbitrary date-range sum queries. Historical data is corrected thousands of times per hour. A teammate proposes prefix sums because range queries become O(1). Review the proposal and choose a structure.

Question 4code-reviewAdvanced

12 pts

Segment tree update correctness

A mutable range-sum implementation updates the leaf value in a segment tree but does not recompute ancestor nodes. The tests pass for single-index queries but fail for wider ranges. Review the bug and state the invariant.

Question 5scenarioAdvanced

13 pts

Bitmask production trade-offs

A team wants to store product permissions as a single integer bitmask instead of a set of strings. Give a production-grade argument for and against this change.

Question 6multiple-choiceAdvanced

9 pts

Bitwise invariant reasoning

Every integer in an array appears exactly twice except one integer that appears once. Which explanation best justifies the O(1)-space XOR solution?

Question 7codingAdvanced

15 pts

Composing data structures for cache design

Design an LRU cache with `get` and `put` in O(1) average time. Name the two cooperating structures and explain eviction behavior.

Question 8scenarioAdvanced

15 pts

Production DSA decomposition and trade-off reasoning

A feed service uses one append-only array for ordered rendering, duplicate prevention, item lookup by ID, ranking, and old-item search. It works for prototypes but is now slow and hard to change. Review the design and propose a production DSA decomposition.