subject
Engineering, 23.12.2019 21:31 sydthekid25

The university has hired you to write an algorithm to schedule their final exams. each quarter, the university offers n different classes. there are r different rooms on campus and t different time slots in which exams can be offered. you are given two arrays e[1..n] and s[1..r] where e[i] is the number of students enrolled in the ith class, and s[j] is the number of seats in the jth room. at most one final exam can be held in each room during each time slot. class i can hold its final exam in room j only if e[i] < s[j].

a. (9 pts) write an algorithm to assign a room and a time slot to each class (or report correctly that no such assignment is possible).

b. (3 pts) provide time complexity analysis.

c. (3 pts) explain why your algorithm is correct.

ansver
Answers: 1

Another question on Engineering

question
Engineering, 03.07.2019 14:10
The y form of iron is known as: a) ferrite b) cementite c) perlite d) austenite
Answers: 3
question
Engineering, 04.07.2019 03:10
What precautions should you take to prevent injuries when dealing with heavy loads?
Answers: 1
question
Engineering, 04.07.2019 18:10
Refrigerant 134a enters an insulated compressor operating at steady state as saturated vapor at -26°c with a volumetric flow rate of 0.18 m3/s. refrigerant exits at 9 bar, 70°c. changes in kinetic and potential energy from inlet to exit can be ignored. determine the volumetric flow rate at the exit, in m3/s, and the compressor power, in kw.
Answers: 1
question
Engineering, 04.07.2019 18:10
Coiled springs ought to be very strong and stiff. si3n4 is a strong, stiff material. would you select this material for a spring? explain.
Answers: 2
You know the right answer?
The university has hired you to write an algorithm to schedule their final exams. each quarter, the...
Questions
question
History, 28.08.2020 02:01
question
Mathematics, 28.08.2020 02:01
question
Computers and Technology, 28.08.2020 02:01
question
Chemistry, 28.08.2020 02:01
question
Chemistry, 28.08.2020 02:01
question
Physics, 28.08.2020 02:01
question
History, 28.08.2020 02:01
question
Mathematics, 28.08.2020 02:01
Questions on the website: 13722366