Card Deck III
Problem statement
Card Deck III is the complete spaced-repetition study system. After viewing each card, the user marks it as Known or Unknown. Unknown cards are re-queued for review. The session ends when all cards are marked Known, showing a completion summary with stats.
Build on top of Card Deck II to add: a Known / Unknown rating system, a review queue that re-adds unknown cards, a session completion screen, and a progress bar showing how many cards remain.
The algorithmic challenge is queue management: the review queue should randomise unknown cards when re-adding them so the same card doesn't immediately reappear. Track attempts per card for the summary statistics.
Requirements & constraints
- Known button removes card from queue permanently
- Unknown button re-queues card at a random later position
- Session complete screen shows accuracy % and time taken
- Progress bar updates as cards are cleared
- Randomise position of re-queued unknown cards
- Track per-card attempt count for summary
How to approach Card Deck III
The strategy an interviewer expects you to reach for.
Why This Question Exists Card Deck III tests queue-based data management and session analytics — a step up from pure UI work. It models a real spaced-repetition system (like Anki) and tests whether you can design a data structure that supports O(1) dequeue and O(n) random re-insert, while separately tracking stats without complicating the queue logic.
The full solution is part of HelloFrontend Pro
The question above is free to read in full. Upgrade to unlock the interactive workspace and the senior-level walkthrough that go with it.
- Live React sandbox pre-wired for this component
- Time-boxed checkpoints that mirror a real 45-minute round
- Interviewer scoring criteria and a full reference implementation
Already a member? Log in to open the workspace.