Episode processing timeline
A podcast app imports episodes through two stages that run side by side: one decoder thread and one tagger thread. Episode i takes decode_seconds[i] on the decoder and tag_seconds[i] on the tagger, and the two lists have the same length. Each stage handles one episode at a time and takes them in the order given. The decoder starts at time 0 and begins each episode the instant it finishes the previous one. The tagger can begin an episode only once the decoder has finished that episode and the tagger has finished the previous one, whichever of the two happens later. Return a list where element i is the time the tagger finishes episode i. Durations may be zero, and an empty import returns an empty list.
pipeline_exit_times(decode_seconds: list[int], tag_seconds: list[int]) → list[int][[3,1,2],[2,4,1]]out[5,9,10][[1,1,1],[5,5,5]]out[6,11,16][[5,5],[1,1]]out[6,11]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.
[[3,1,2],[2,4,1]][5,9,10]not run yetsample[[1,1,1],[5,5,5]][6,11,16]not run yetsample[[5,5],[1,1]][6,11]not run yetsample