-
-
Save parzibyte/7b5e3b6ce26ae0b700dd8aedfb56acb4 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
def seleccion(arreglo): | |
longitud = len(arreglo) | |
for i in range(longitud-1): | |
for j in range(i+1, longitud): | |
if arreglo[i] > arreglo[j]: | |
# Intercambiar | |
arreglo[i], arreglo[j] = arreglo[j], arreglo[i] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment