Skip to content
playdsa
Preferences

Make yourself comfortable.

Saved on this browser. Your device’s reduced-motion preference is always respected.

Theme
Advanced settings

Course Order

Learn
Play
Prove
Problem context and objectives
Mission briefing

Expedition navigator · Safe camps and hazards form a connected world map

Find a valid route while marking every place already explored: Course Order.

Without visited state, the party loops forever or revisits expensive terrain.

How you win

  1. 1Recognize when Kahn topological ordering matches the clues
  2. 2Keep this true after every move: the queue contains exactly the unplaced courses whose prerequisites have all been placed
  3. 3Reach the result within O(V + E) time and space

Rules and pressure

  • Target cost: O(V + E) time and space
  • State rule: the queue contains exactly the unplaced courses whose prerequisites have all been placed

New words in this mission

Open a term for a plain-language explanation.
durable queue+

A waiting line that keeps work until a consumer finishes it. It absorbs bursts and lets failed work be retried.

Lesson 1 of 3

Indegree is the number of unfinished prerequisite locks. Only a zero-lock course may enter the ready queue.

Your call · Course 3 still has one lock after placing course 1. Is course 3 ready?

Help shape PlayDSA

Something confusing, broken, or missing? Leave a quick note without leaving your lesson.

Please leave out passwords, payment details and other private information.

Page included: /

Sign in to save feedback here, or send it with your email app. Your draft stays here while you sign in.

Open email instead