Selection Sort - C#
Join the DZone community and get the full member experience.
Join For FreeSelection Sort - C#
Efficiency: O(n^2)
public int[] SelectionSort(int[] arr)
{
//1. Find min
//2. Swap it with first element
//3. Repeat starting from secong position onwards.
int _min = 0;
for (int i = 0; i
Sort (Unix)
Opinions expressed by DZone contributors are their own.
Comments