Question
Your CI runs jobs many times a day and logs one line per run: "<job> <result>", where result is "pass" or "fail". A job is considered flaky when the SAME job name has at least one "pass" run and at least one "fail" run in the log. A job that always passes, or always fails, is not flaky. Return the flaky job names sorted alphabetically; return an empty list if none qualify.
flaky_jobs(lines: list[str]) → list[str][["build pass","test fail","test pass","lint pass"]]out["test"]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.