Today, we’re going to explore another sorting algorithm – the Selection Sort algorithm, implemented in JavaScript.
Selection Sort is another simple sorting algorithm that sorts an array by repeatedly finding the minimum element from the unsorted part and putting it at the beginning. Like Bubble Sort algorithm, it’s not the most efficient for large datasets, but it’s a valuable algorithm to understand.
![selection sort algorithm](https://codingissimple.com/wp-content/uploads/2024/02/Selection-Sort-Animation.gif)
https://en.wikipedia.org/wiki/Selection_sort
Red is current minimum, yellow is sorted list, blue is current item.