Company: Oracle_14nov
Difficulty: medium
Meeting Scheduler Problem An office has m meeting rooms numbered 1 through m . There are n bookings already in the calendar; booking i is written [roomID, startTime, endTime] and occupies room roomID for the half-open interval from startTime to endTime . Someone now asks for a room for the window from requestedStartTime to requestedEndTime . A room can be offered only if no booking in that room covers any moment of the requested window. A meeting that ends exactly when another starts does not clash: a booking ending at time t and the requested window starting at time t can both go ahead, and so can a booking starting at t and a window ending at t . Return the IDs of all rooms that are free for the whole requested window, in increasing order. Input Format Line 1: requestedStartTime and requestedEndTime , separated by a space. Line 2: m and n , separated by a space. The next n lines: three integers roomID startTime endTime , one booking per line. These lines are absent when n = 0 . Outpu