We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c55ca93 commit 6232f8dCopy full SHA for 6232f8d
1 file changed
Sorts/CountingSort.js
@@ -28,9 +28,7 @@ const countingSort = (arr, min, max) => {
28
res[count[arr[i] - min]] = arr[i]
29
count[arr[i] - min]--
30
}
31
- // Copy the result back to back to original array
32
- arr = [...res]
33
- return arr
+ return res
34
35
36
/**
0 commit comments