Copyright ©2004 Pearson Addison-Wesley. All rights reserved.
Selection Sort in an Array
Selection sort is an intuitive sorting algorithm.
Find the index of the smallest element in the array.
Swap the smallest element with the first element.
Repeat the above steps for the 2nd, 3rd, …, smallest elements.