SELECTION-SORT.JS


comparisons:
swaps:



Selection sort involves finding the smallest element in the array and placing it at the beginning. As this is repeated, a sorted partition is created at the beginning of the array. This is done until there are no more unsorted elements left.

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