216. Score Board Sorter
Easy · Sorting
Given an array of player objects `{name, score}`, return them sorted from highest to lowest score.
Examples
Example 1
Input: [{name:"Luna",score:9500},{name:"Max",score:7200}]
Output: [{name:"Luna",score:9500},{name:"Max",score:7200}]
Explanation: Already sorted descendingConstraints
- 1 ≤ players.length ≤ 50