Preparing your design workspace

Loading the problem and your latest saved attempt…

Design a Scheduled Examination Platform

Run timed examination sections, preserve accepted answers, submit automatically at each deadline, and return a reproducible result promptly.

Problem statement

For this exercise, assume an institution schedules a multiple-choice examination in one fixed 60-minute window. An organizer publishes an immutable exam version with three ordered 20-minute sections, their questions, answer choices and scoring rules, and a fixed opening and closing time for each section.

An eligible student starts at most one attempt and can save, revise and resume answers only in the currently open section. Starting late does not extend any deadline or reopen an earlier section.

At each section deadline, the server automatically closes that section using its last durably accepted answers; later sections open on the published schedule. A student may submit the whole examination early. Otherwise the server automatically submits it at the exam deadline.

Whole-exam submission closes every remaining section and freezes one immutable answer snapshot. An answer change is accepted only when its authoritative serialization time is strictly before both its section deadline and the exam deadline and before whole-exam submission. A browser timer cannot authorize extra time.

The platform computes the objective score from the pinned exam version and makes the final result available immediately after whole-exam submission; for this practice contract, the target is within two seconds for 99 percent of finalized attempts.

A delayed or failed grading operation must report pending rather than an invented or provisional final score. Students can retrieve submission status and their authorized result without seeing private answer keys.

Design publication, attempt admission, durable answer saves, section closure, whole-exam submission, result delivery and recovery. Identity verification, live proctoring, essay marking, code execution, payments and appeals are outside scope.

What to build

  1. Publish an immutable exam version, student eligibility, three section schedules and objective scoring rules before the opening time.
  2. Admit one attempt per eligible student and allow authorized answer saves, revisions and resume only for the currently open section.
  3. Close each section automatically at its deadline and submit the whole examination once, either early or automatically at the exam deadline, using only accepted durable answers.
  4. Return a reproducible final score promptly after whole-exam submission, with honest pending status during a failure and without revealing private answer keys.

At scale

  • Assume 200,000 students begin within the same two-minute opening burst; support 20,000 answer-save requests per second at peak.
  • A successful answer save must reflect a durable commit that survives one availability-zone failure; target p95 save latency below 500 milliseconds under admitted load.
  • Enforce all deadlines using server-authoritative serialization time. Make results available within two seconds for 99 percent of finalized attempts, including a synchronized closing burst.
  • Retain attempts, accepted answer revisions needed for audit, section snapshots, submission records and scores for 90 days; answer keys remain restricted to grading and authorized organizers.