Maximum Profit in Job Scheduling
Sort jobs by end time and keep the best profit so far; each job either skips or adds to the best compatible prefix.
Sort jobs by end time and keep the best profit so far; each job either skips or adds to the best compatible prefix.