Question
A CI system logs "<job> <ts> START" when a job begins and "<job> <ts> END" when it finishes, with ts as integer Unix seconds. Runs of different jobs interleave freely, but each job name appears exactly once as START and exactly once as END, with the END timestamp later. Given the log lines (chronological) and a duration limit in seconds, return the names of all jobs whose run took STRICTLY longer than the limit, sorted alphabetically.
overrunning_jobs(lines: list[str], limit: int) → list[str][["nightly-backup 100 START","report-gen 120 START","report-gen 200 END","nightly-backup 700 END"],300]out["nightly-backup"]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.
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.