The following are the key steps in the selection sort algorithm: Determine the smallest (or greatest) element. Replace the discovered element with the first unsorted element. In the unsorted section, look for the actual minimum (or maximum) element. Repeat the procedure until the array has been sorted.