The Selection Sort algorithm sorts an array by looking for the smallest item and moving it to the front of the list. That’s really all you have to know. Let’s jump into an example.
Selection Sort starts by setting the first value as the minimum value.
It then starts comparing it with each value in the array. If a lower value is found, the minimum value is updated, and the traversal continues until the end of the array is reached. During the first comparison, the value at index 1 is compared to the minimum value.

#programming #algorithms #computer-science #sorting-algorithms #selection-sort

Selection Sort Algorithm Visually Explained
1.50 GEEK