Question
A gradebook stores students as two parallel columns: `ids` (integer student ids) and `names` (names, same order, all distinct). Quiz attempts arrive separately as rows "id,score" — a student may have several attempts or none, and rows may reference unknown ids (ignore those). A student passes when their BEST attempt is at least `threshold`. Return the passing students' names, sorted alphabetically. Example: ids [101, 102, 103], names ["ava", "raj", "mia"], attempts ["101,72", "102,88", "101,95", "103,60"], threshold 80 give ["ava", "raj"].
passing_students(ids: list[int], names: list[str], attempts: list[str], threshold: int) → list[str][[101,102,103],["ava","raj","mia"],["101,72","102,88","101,95","103,60"],80]out["ava","raj"]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.