Each record is [name, score]. Return the list of names ordered by score from highest to lowest. When two records have the same score, the name that comes first alphabetically goes first.
A name can appear in more than one record; keep every record.
Example 1
Input:
sort_records([['bo', 5], ['al', 9], ['cy', 5]])
Output:
['al', 'bo', 'cy']
al has the top score. bo and cy tie on 5, so bo comes first.
Example 2
Input:
sort_records([['zed', 1]])
Output:
['zed']
0 <= len(records) <= 2 * 10**5name is a lower-case string, 0 <= score <= 10**9No results yet
Run your code to check it against the examples, or submit to run every test.