Skip to content

Commit

Permalink
진료순서 정하기
Browse files Browse the repository at this point in the history
  • Loading branch information
dudwns committed May 1, 2023
1 parent d1c485a commit 825f7eb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Programmers/exam67.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function solution(emergency) {
const rank = [...emergency];
rank.sort((a, b) => b - a);
return emergency.map((n) => rank.indexOf(n) + 1);
}

0 comments on commit 825f7eb

Please sign in to comment.