Code RoomMaximum concurrent load
MediumPrep Room Coding #771

Maximum concurrent load

CodingAlgorithms & data structuresMid–Senior~25 min

You are given a list of activity logs, each [start, end, weight], where an activity contributes its weight to the system load over the half-open time window [start, end). Return the maximum total weight that is simultaneously active at any single instant. If an activity ends at the same time another begins, they do NOT overlap. The list has at least one log.

Implement
busiest_period(logs: list[list[int]]) → int
Examples
in[[[1,5,2],[2,6,3],[4,7,1]]]out6
What a strong answer looks like

State 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:00 of about 25 min
InputExpectedGot
[[[1,5,2],[2,6,3],[4,7,1]]]6not run yetsample