Created
May 16, 2020 06:30
-
-
Save parzibyte/6c05f6aab874c7da617bf2ab84730f60 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 seleccion(int arreglo[], int longitud) { | |
for (int i = 0; i < longitud - 1; i++) { | |
for (int j = i + 1; j < longitud; j++) { | |
if (arreglo[i] > arreglo[j]) { | |
// ...intercambiarlos, es decir, mover el actual a la derecha y el de la derecha al actual | |
intercambiar(&arreglo[i], &arreglo[j]); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment