AlgoScope

Job Sequencing with Deadlines

AlgorithmintermediateGreedy

Richest job first, placed in the latest free slot before its deadline; no free slot means it is dropped.

Decision · step 2 of 7Intervals and Greedy Choices: Job sequencing with deadlines
123jobprofita✓100✓

Job a, profit 100, deadline 2: slot 2 is free, so it goes there. Total profit 100.

Open in the player →or start at step 2

What you will see

Slots on a timeline; each job walks back from its deadline to the first empty slot.

How intervals and greedy choices works →

Cost

BestO(n log n)
AverageO(n^2)
WorstO(n^2)
SpaceO(n)

O(n log n) with union-find over slots.

How you work with it here

play it through, step one change at a time, scrub to any step, run it on your own input, predict what happens next.

Screen readers: Candidates announce their key and state (candidate, chosen, rejected); each step announces the local choice and its consequence.

Reduced motion: Chosen and rejected states crossfade; no travelling emphasis.

Before this

Taught by the same lesson

Intervals and Greedy Choices covers these too, in the same run.