Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Selection Sort - C#

DZone 's Guide to

Selection Sort - C#

· Web Dev Zone ·
Free Resource

Selection 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

Topics:
web dev ,c# ,code snippet

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}