Code RoomPassing students by best attempt
MediumPrep Room Coding #403

Passing students by best attempt

CodingAlgorithms & data structuresEntry–Mid~16 min

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"].

Implement
passing_students(ids: list[int], names: list[str], attempts: list[str], threshold: int) → list[str]
Examples
in[[101,102,103],["ava","raj","mia"],["101,72","102,88","101,95","103,60"],80]out["ava","raj"]
What a strong answer looks like

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.

0:00 of about 16 min
InputExpectedGot
[[101,102,103],["ava","raj","mia"],["101,72","102,88","101,95","103,60"],80]["ava","raj"]not run yetsample