4-problem sprint
You cleared the easy problem completely and most of the first medium. The sliding-window problem passed only 3 of 8 hidden tests because the nested loop times out on larger inputs, and the hard problem was never submitted.
You spent 31 of your 70 minutes on the sliding-window problem, which is more than the two easier problems combined. That left 9 minutes for the hard problem, which was never going to be enough to finish it.
Empty inputs were not handled in three of the four problems. The range-merging solution also crashes on an empty list because it indexes spans[0] before checking the list has anything in it.
Readable and conventionally named throughout. The window solution leaves an unused accumulator and the task-ordering attempt leaves a half-built graph with a hardcoded empty return, which reads as abandoned rather than incomplete.
You opened the problems in order and never came back to reconsider. The 31 minutes on problem 3 is where this round was lost: you had a working brute-force answer after 9 minutes and spent the next 22 trying to make it faster without changing the approach. Banking that partial score and moving to problem 4 would have scored higher than either problem ended up scoring.
All 6 hidden tests passed. Two-pass counting is the right approach here and your first-seen ordering is correct.
You could return early from the counting pass in the single-element case, but at this size it makes no practical difference.
Sorting by start and extending the last range is the correct shape, and 6 of 9 hidden tests passed.
Failed on an empty input list and on ranges that touch exactly at a boundary, such as [1,3] and [3,5].
Guard the empty case before indexing spans[0], and decide explicitly whether touching ranges should merge. State the assumption in a comment when the brief is silent on it.
The logic is correct and the visible examples pass.
3 of 8 hidden tests timed out. The nested loop is O(n squared), and the larger hidden inputs are sized specifically to reject that.
This is a two-pointer problem. Grow the window while the sum fits and shrink from the left when it does not, which gets you to a single pass. Recognising that shape early would have saved you roughly 20 minutes.
Nothing was submitted, so there is nothing to score here.
Never submitted.
You had the adjacency map started and the direction of the edges right. With 20 minutes instead of 9 this was reachable. The fix is upstream: leave yourself the time.
