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.
Red is current minimum, yellow is sorted list, blue is current item.