Find worst job overlap
A CI fleet must run every job today. Job i cannot begin before releases[i], must be finished by deadlines[i], and once begun it runs without interruption for runtimes[i] minutes. The scheduler places each job anywhere inside its own span, and the jobs know nothing about each other. Some minutes are unavoidable: whatever the scheduler picks, a job whose span leaves it little slack has to be running then. Capacity planning wants the worst such moment, so return the largest number of jobs that are certainly running together at one single minute under every possible placement. Return 0 when no minute is forced on anybody. Return -1 when some job cannot fit inside its own span at all. Minute stamps may be negative, they reach 10^9 in size, and there can be 100000 jobs.
guaranteed_concurrency(releases: list[int], deadlines: list[int], runtimes: list[int]) → int[[0,0],[10,10],[8,8]]out2[[0],[100],[10]]out0[[5],[8],[4]]out-1State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
[[0,0],[10,10],[8,8]]2not run yetsample[[0],[100],[10]]0not run yetsample[[5],[8],[4]]-1not run yetsample