DSAVisualiseData Structures & Algorithms Studio
Graphs & Connectivity Hard

Topological Order Validation

A schedule is valid only when each task appears once, after every prerequisite, and no task is omitted.

Trace input

Bounded JSON

Edit the lesson input, then build a deterministic source-linked trace.

This lesson validates its own input and operation limits.

Source scenarios

Complexity

BestΘ(V + E)
AverageΘ(V + E)
WorstΘ(V + E)
SpaceΘ(V)

Array state

Follow the active comparisons and writes.

Live snapshot

Current operation

Trace state
Ready to explore
Source behavior & common mistakes

Check the supplied ordering. This exercise validates a schedule; it does not construct a topological ordering.

  • Constructing a new topological order instead of validating the supplied list.
  • Accepting a schedule that omits tasks.

Algorithm code

Java
TaskScheduler.javaStep linked
The highlighted line follows the current step.

Ready to begin

Press Play to see what happens.

Detailed execution
Snapshot 1 / 1