Mental Model
We want to schedule jobs so that we finish as many as possible before their deadlines, choosing the most profitable jobs first.
Analogy: Imagine you have a list of tasks to do before certain times, and each task gives you some money. You want to pick tasks that pay the most and still finish on time, like picking the best gigs before their deadlines.
Jobs: [Job1: profit=20, deadline=2]
[Job2: profit=15, deadline=2]
[Job3: profit=10, deadline=1]
[Job4: profit=5, deadline=3]
[Job5: profit=1, deadline=3]
Schedule slots: [ _ ] -> time 1
[ _ ] -> time 2
[ _ ] -> time 3