FunctionRacerProblemsRace

Order by Score

MediumNumPyPython

names[i] scored scores[i]. Return the list of names sorted by score from highest to lowest. When two people have the same score, the one who comes earlier in names goes first.

Example 1

names ["Ana","Ben","Cy"]
scores [70,90,70]
returns ["Ben","Ana","Cy"]

Ben is first; Ana and Cy tie, and Ana comes earlier.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More NumPy problems