Code RoomSeason leaderboard ranking
EasyPrep Room Coding #4720

Season leaderboard ranking

CodingAlgorithms & data structuresEntry–Mid~14 min

A puzzle league publishes its season leaderboard from three parallel lists. names holds each player's handle, points holds the score they finished on (penalties can push it below zero), and seconds holds their total solve time. Return the handles in final standing order. Rank by points from high to low. When two players finished on equal points, the smaller seconds ranks higher, since the faster solve breaks the tie. When points and seconds both match, order those handles lexicographically ascending as ordinary strings, so 'k10' sorts before 'k2'. Handles are distinct, so the rule always yields exactly one order. The three lists always have the same length, and an empty roster returns an empty list.

Implement
rank_tournament_board(names: list[str], points: list[int], seconds: list[int]) → list[str]
Examples
in[["nova","quill","atlas"],[30,45,30],[120,90,95]]out["quill","atlas","nova"]
in[["zephyr","cobalt"],[10,10],[60,60]]out["cobalt","zephyr"]
in[["lumen"],[0],[400]]out["lumen"]
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 14 min
InputExpectedGot
[["nova","quill","atlas"],[30,45,30],[120,90,95]]["quill","atlas","nova"]not run yetsample
[["zephyr","cobalt"],[10,10],[60,60]]["cobalt","zephyr"]not run yetsample
[["lumen"],[0],[400]]["lumen"]not run yetsample