We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d83222 commit 3339b11Copy full SHA for 3339b11
JooKangSan/[week9]Sort/Ranking.js
@@ -0,0 +1,6 @@
1
+function solution(score) {
2
+ const sum = score.map((el) => (el[0] + el[1]));
3
+ let sortedSum = sum.slice().sort((a, b) => b - a);
4
+
5
+ return sum.map((el) => sortedSum.indexOf(el) + 1);
6
+}
0 commit comments