mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-06 17:50:39 +08:00
Add function documentation to combSort function
This commit is contained in:
@ -16,7 +16,13 @@
|
||||
* Wikipedia: https://en.wikipedia.org/wiki/Comb_sort
|
||||
*/
|
||||
|
||||
function combSort (list) {
|
||||
/**
|
||||
* combSort returns an array of numbers sorted in increasing order.
|
||||
*
|
||||
* @param {number[]} list The array of numbers to sort.
|
||||
* @return {number[]} The array of numbers sorted in increasing order.
|
||||
*/
|
||||
function combSort(list) {
|
||||
if (list.length === 0) {
|
||||
return list
|
||||
}
|
||||
|
Reference in New Issue
Block a user