Selection Sort Algorithm
It is a simple sorting algorithm.
It sorts a list of values by repeatedly putting the smallest element
and place into its final position until all arrays are sorted.
It has less temporary storage space used; however, it is inefficient
for large lists as it has an O(n2) time complexity.
Functions
The least element in the unsorted list selects to put on its position
until all elements are on its ordered position.
EXAMPLE:
UNSORTED LIST:
64 32 10 25 44
1ST PASS:
10 32 64 25 44
2ND PASS:
10 25 64 32 44
3RD PASS:
10 25 32 64 44
4TH PASS:
10 25 32 44 64
SORTED LIST:
10 25 32 44 64