Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created May 23, 2021 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/7b5e3b6ce26ae0b700dd8aedfb56acb4 to your computer and use it in GitHub Desktop.
Save parzibyte/7b5e3b6ce26ae0b700dd8aedfb56acb4 to your computer and use it in GitHub Desktop.
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