Mental Model
We want to schedule jobs to finish before their deadlines and get the most profit by picking the best 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 so you earn the most money without missing 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: 1 -> null
2 -> null
3 -> null