Selection Sort
Introduction
Selection sort works by selecting the smallest value out of the unsorted part of the array and placing it at the back of the sorted part of the array.
Algorithm
find the smallest number in the between index 0 and n-1
swap it with the value at index 0
repeat above 2 steps each time, starting at one index higher than previous and swapping into that position
Animation
C/C++ Implementation
Last updated