DSABeginnerReady

Engineering Cost Models Assessment

This assessment verifies the Engineering Cost Models module. Passing it contributes up to 6 points in the 0-6 score band.

Questions

8

Limit

60m

Pass

85%

Score

+6

Question 1multiple-choiceBeginner

8 pts

DSA purpose and cost-model thinking

Which statement best describes why DSA matters in production engineering?

Question 2scenarioBeginner

14 pts

Choosing a structure from access pattern and growth

A notification service checks whether an event ID was already sent before inserting a new notification. The current implementation scans the user's full notification array on every event. At 100 notifications it is fine; at 50,000 notifications users see delayed alerts. What change would you propose, and what trade-off must you mention?

Question 3code-reviewBeginner

14 pts

Finding accidental nested linear work

Review this code: `users.filter(u => activeIds.includes(u.id))`. `users` can contain 200,000 records and `activeIds` can contain 80,000 IDs. Explain the risk, rewrite the core idea, and state the before/after complexity.

Question 4scenarioBeginner

14 pts

Space complexity and deliberate memory spending

An ingestion worker receives millions of events and must write each unique event once. A teammate wants O(1) extra memory by scanning the accepted output list for every incoming event. Push back or accept the proposal with a precise time-space trade-off.

Question 5scenarioBeginner

16 pts

Reading constraints and choosing defensible implementation

A support product needs keyword search across 2 million notes, 500 queries per second, p95 latency under 150 ms, writes every second, and a memory cap. Compare naive scanning with an index-based approach and defend the trade-off.

Question 6codingBeginner

14 pts

Applying membership lookup to stream processing

Given a stream/list of event names, return the first event that appears twice. Optimize for millions of events. Include complexity and edge-case behavior.

Question 7scenarioBeginner

10 pts

Avoiding cargo-cult optimization

A teammate wants to replace every array in a small settings screen with maps because maps have faster lookup. Push back with a precise engineering argument.

Question 8multiple-choiceBeginner

10 pts

Assessment-grade trade-off communication

Which answer is strongest in a SkillSkore assessment?