Mental Model
We want to schedule jobs so that we finish as many as possible before their deadlines, picking the most profitable ones first.
Analogy: Imagine you have several tasks to do before certain times, but you can only do one task at a time. You pick the most valuable tasks that fit in your schedule without overlapping.
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: 1 -> 2 -> 3 -> null
Each slot can hold one job before its deadline.