COMB-SORT.JS


comparisons:
swaps:



The comb sort traverses the array comparing elements with a wide gap between them. After each pass, this gap is shortened. At the end of the sort, its behavior is identical to that of a bubble sort. comb sorting can be seen as a sort that optimizes an array so it can be efficiently sorted by bubble sort.

sort.js
bubble-sort.js optimized-bubble-sort.js selection-sort.js
cocktail-sort.js optimized-cocktail-sort.js
odd-even-sort.js comb-sort.js quick-sort.js
gnome-sort.js optimized-gnome-sort.js
compare sort algorithms