Skip to content

Commit

Permalink
중앙값 구하기
Browse files Browse the repository at this point in the history
  • Loading branch information
dudwns committed Mar 24, 2023
1 parent 8376849 commit a6b89a0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Programmers/exam28.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
function solution(array) {
return array.sort((a, b) => a - b)[Math.floor(array.length / 2)];
}

0 comments on commit a6b89a0

Please sign in to comment.