You are using an outdated browser. Please update your browser for a better user experience.

Job Sequencing

greedy

Given an array of jobs where every job has a deadline and associated profit if the job is finished before the deadline. It is also given that every job takes the single unit of time, so the minimum possible deadline for any job is 1. How to maximize total profit if only one job can be scheduled at a time.

Example:

Input: Four Jobs with following deadlines and profits JobID a,b,c,d Deadline 4,1,1,1 Profit 20,10,40,30

Output: c,a