Algorithm · Anthropic · Medium
You are given n tasks. Task i has a start time start[i] and a processing length duration[i]. It occupies the time window [start[i], start[i] + duration[i]). Schedule each task so that the number of workers used is as small as possible. A worker cannot handle two tasks simultaneously. If a worker finishes a task at time t and the next task starts exactly at t, that same worker may immediately take the new task. Workers are distinguished by integer IDs beginning at 1. Use the…
Checking your access…