Unit2 Selection Sort
Unit2 Selection Sort
• selectionSort(array, size)
• repeat (size - 1) times
• set the first unsorted element as the minimum
• for each of the unsorted elements
• if element < currentMinimum
• set element as new minimum
• swap minimum with first unsorted position
• end selectionSort
Source code:
output