28/41
Part 6 of 7 · The worked exampleLearn

A worked example: the most pay from jobs that can't overlap

Maximum Profit in Job Scheduling is on Airbnb's LeetCode tag lists: the all-time, six-month and three-month ones (3 sources). In our setting, one GPU runs render jobs, one at a time. Each job has a start hour, an end hour and what it pays. A job can start at the hour another ends. Pick the jobs that pay the most in total.

jobs = [(1, 5, 70), (9, 14, 100), (0, 4, 60), (6, 11, 20), (4, 6, 40), (7, 10, 30)]
Predict

Jobs (start, end, pay): (0, 4, 60), (1, 5, 70), (4, 6, 40), (7, 10, 30), (6, 11, 20), (9, 14, 100), no two at once. What's the most pay?

Pick an answer above to see the rest