Season leaderboard ranking
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.
rank_tournament_board(names: list[str], points: list[int], seconds: list[int]) → list[str][["nova","quill","atlas"],[30,45,30],[120,90,95]]out["quill","atlas","nova"][["zephyr","cobalt"],[10,10],[60,60]]out["cobalt","zephyr"][["lumen"],[0],[400]]out["lumen"]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.
[["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