[WPI] [cs2223] [cs2223 text] [News] [Syllabus] [Exams]
Go to Solution
Prove or disprove these statements:
A "WPI heap" is a heap of integers in which there are no duplicate values. WPI heaps, as other heaps, are stored in arrays. Write a program in C or C++ which turns a WPI heap into a binary search tree. A binary search tree has these properties:
A printing shop charges the same amount to print a job, no matter how many pages are printed. Each job has a deadline, a time by which it must be printed or it won't be paid, and an estimated print time (duration). Here is an example:
Job | Deadline | Duration |
1 | 5 | 1 |
2 | 9 | 3 |
3 | 6 | 3 |
4 | 7 | 1 |
5 | 2 | 2 |
6 | 8 | 2 |
The shop has only one printing press. Write an algorithm which schedules print jobs so that the shop earns the maximize amount of money.
Demonstrate your algorithm using the above data. This is only a small part of the problem - your algorithm is more important than your answer.
[cs2223 text] [News] [Syllabus] [Exams] |