BUBBLE-SORT.JS


comparisons:
swaps:



Bubble sort is known as the simplest, least efficient exchange sort algorithm. The array to be sorted is traversed, comparing adjacent elements, and switching them if they are out of order. The process is repeated until the array manages to be traversed without any swapping taking place.

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