Skip to content

Greedy algorithm to choose a best plan from schedule given with a help of quick sort.

License

Notifications You must be signed in to change notification settings

soheil-hamidi/plan-scheduler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

plan-scheduler

Greedy algorithm to choose a best plan from schedule given with a help of quick sort.

Input and Output:

The input to the problem should be in a *.txt format. In the text file, the first line gives starting time (S) and ending time (F), the second line gives the number of projects, and each subsequent line gives the project number, and start and finish time of a potential project.

Input for the example problem given above would be:

3 10

8

1 2 5

2 1 2

3 3 4

4 5 9

5 6 8

6 7 9

7 7 13

8 4 9

Output consists of the selected projects as a list, then divided into two sets with total times as equal as possible. For the example, it should look something like this:

Selected Projects: 1 4 7

Group 1 Projects: 1 4 Total Time = 7

Group 2 Projects: 7 Total Time = 6

About

Greedy algorithm to choose a best plan from schedule given with a help of quick sort.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages