The selection sort algorithm works by repeatedly exchanging elements: first finds the smallest in the array and exchange it with the element in the first position, then find the second smallest elemen...The selection sort algorithm works by repeatedly exchanging elements: first finds the smallest in the array and exchange it with the element in the first position, then find the second smallest element and exchange it with the element in the second position, and continue in this way until the entire array is sorted.