Created
February 8, 2017 20:49
-
-
Save EugenyB/f50504176bd933c44c06fb43a640f149 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void chooseSort(int a[], int size){ | |
for(int i=0; i < size-1; i++){ | |
int nmin = i; | |
for(int j=i+1; j<size; j++){ | |
if(a[j]<a[nmin])nmin = j; | |
} | |
if(i != nmin){ | |
int t = a[nmin]; | |
a[nmin] = a[i]; | |
a[i] = t; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment