Skip to content

Commit 4ebe593

Browse files
committed
Add function documentation to combSort function
1 parent 199d263 commit 4ebe593

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Sorts/CombSort.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@
1616
* Wikipedia: https://en.wikipedia.org/wiki/Comb_sort
1717
*/
1818

19-
function combSort (list) {
19+
/**
20+
* combSort returns an array of numbers sorted in increasing order.
21+
*
22+
* @param {number[]} list The array of numbers to sort.
23+
* @return {number[]} The array of numbers sorted in increasing order.
24+
*/
25+
function combSort(list) {
2026
if (list.length === 0) {
2127
return list
2228
}

0 commit comments

Comments
 (0)