SelectionSort(A, size); current = 0 while current < size do small = current search = current +1 while search < size do if A[small] > A[search] small = search ++search; if small != current swap(A[small],A[current]) ++current