Algorithm · DoorDash · Medium
Problem You are given a set of n orders that must be handled by couriers. Each order occupies a single courier continuously over the time span [start_i, end_i) (half-open intervals: the instant end_i is not included). A courier can work on at most one order at a time. Determine the smallest number of couriers needed so that every order can be assigned without any time overlap. Input (stdin) First line: the integer n Next n lines: two integers start_i and end_i Output…
Checking your access…