Question: I need a program in C that will schedule the maximum number of jobs. The program should read input from a file and print out

I need a program in C that will schedule the maximum number of jobs. The program should read input from a file and print out the of names of the jobs that can be completed. Two jobs overlap if the end time of one job is equal to or greater than the start time of another. If there are jobs with the same ending time then choose the one with the earliest start time. If multiple jobs have the same end and start times then choose the one that comes later in the input.

Ex of file input:

5 // number of jobs 6 // maximum end time for a job A 1 3 // job name, start time, end time B 3 4 C 4 6 D 5 6 E 4 6

Ex of file output:

A

E

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!