Algorithm · Apple · Medium
You are given a list of meeting intervals. Each interval has the form [start, end), meaning the meeting occupies a room from time start up to, but not including, time end. Because the interval is half-open, a meeting ending at time t does not overlap with a meeting starting at time t. For the given list of intervals, compute two results: canScheduleInOneRoom: true if all meetings can be placed in a single room without any overlap, otherwise false. minRooms: the minimum…
Checking your access…