We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f9ab318 commit 8f38987Copy full SHA for 8f38987
JustDevRae/Hash/rank_order.js
@@ -0,0 +1,6 @@
1
+function solution(score) {
2
+ const averages = score.map(([english, math]) => (english + math) / 2);
3
+ const sortedAverages = [...averages].sort((a, b) => b - a);
4
+
5
+ return averages.map((avg) => sortedAverages.indexOf(avg) + 1);
6
+}
0 commit comments