Last active
January 7, 2019 15:16
-
-
Save edubriguenti/15015b241d4a1811bef0866884e07fc2 to your computer and use it in GitHub Desktop.
Selection_Sort
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 selection_sort(){ | |
for (int i = 0; i < 5; i++){ | |
int menor = i; | |
for (int j = i; j < 5; j++){ | |
if (notas[j] < notas[menor]){ | |
menor = j; | |
} | |
} | |
swap(notas[menor], notas[i]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment