SelectionSort

has name::Selection sort has short description::repeatedly selects the smallest element from the input sequence, deletes it, and adds it to the end of the output sequence. It has a worst-case time complexity of $\mathcal{O}(n^2)$.

Synonyms are has synonym::Sort by Selection

array selectionSort(array input) { array output; while (!input.empty) { (minValue, minIndex) = min(input); input.remove(minIndex); output.append(minValue); } return output; }