Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created May 23, 2021 15:43
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/1315a4081e6982315122a097e91a903d to your computer and use it in GitHub Desktop.
Save parzibyte/1315a4081e6982315122a097e91a903d to your computer and use it in GitHub Desktop.
def seleccion_descendente(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