Skip to content

Commit 8100bd5

Browse files
authored
Update median.js
1 parent 367204a commit 8100bd5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Sprint-1/fix/median.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function calculateMedian(arr) {
88

99
if (cleaned.length === 0) return null;
1010

11-
const sorted = [...cleaned].sort((a, b) => a - b);
11+
const sorted = cleaned.sort((a, b) => a - b);
1212

1313
const mid = Math.floor(sorted.length / 2);
1414

0 commit comments

Comments
 (0)