We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff7a7dc commit 99fc8abCopy full SHA for 99fc8ab
src/algorithms/sort/counting-sort/src/counting-sort.js
@@ -1,9 +1,7 @@
1
/**
2
* Counting Sort
3
*
4
- * Compares each pair of adjacent items and swaps them if they are in the wrong order
5
- * Continues looping through the array until no more swaps are needed
6
- * Not appropriate for large unsorted data sets
+ * Counts the occurrence of each element in the input array and uses that to create a sorted output array
7
8
* Best case performance: Ω(n + k) (always loops through the input array, count array, and output array)
9
* Average case performance: θ(n + k) (always loops through the input array, count array, and output array)
0 commit comments