update bubble sortin informe
This commit is contained in:
12
doc/pseudo/bubblesort.txt
Normal file
12
doc/pseudo/bubblesort.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
entrada: array: arreglo de elementos enteros; n: tamaño del arreglo
|
||||
salida: arreglo array ordenado ascendentemente.
|
||||
cuentaDeElementos := n
|
||||
repetir
|
||||
haCambiado := falso
|
||||
disminuir cuentaDeElementos
|
||||
repetir con indice desde 1 a cuentaDeElementos
|
||||
if (array en indice) > (array en (indice + 1))
|
||||
intercambiar (array en indice) con (array en (indice + 1))
|
||||
haCambiado := falso
|
||||
hasta haCambiado = verdad
|
||||
retorna array
|
Reference in New Issue
Block a user