GATE | GATE-CS-2003 | Question 90

The following are the starting and ending times of activities A, B, C, D, E, F, G and H respectively in chronological order: “asbscsaedsceesfsbedegseefehsgehe

Here, xs denotes the starting time and xe denotes the ending time of activity X. W need to schedule the activities in a set of rooms available to us. An activity can be scheduled in a room only if the room is reserved for the activity for its entire duration. What is the minimum number of rooms required ?
(A) 3
(B) 4
(C) 5
(D) 6

Answer: (B)

Explanation: Room1 – As
Room2 – Bs
Room3 – As
now A ends (Ae) and now Room3 is free
now A ends (Ae) and Room1 is free
now B ends Room2 is free
now D ends Room3 is free
now E ends Room1 free
now F ends Room4 free
now G and H ends.
Totally used 4 rooms


Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.

Please write to us at to report any issue with the above content.