Algorithm · Google · Medium
This question is a family of interval-scheduling tasks. The central version supplies a list of time intervals intervals, each a pair (start, end). The intervals could stand for meetings, car pickup and return pairs, or server job runs. Depending on the variant, you are asked for one or more of the following: The smallest number of rooms, cars or servers needed so that every interval can be honored at the same time. This is the canonical minimum-meeting-rooms task,…