Bubble Sort (Intercambio directo)

Desordenado: -1, 5, 10, 12, 4, 10, -1, 7, 5, 12,

Burbuja mejorado

  1. Iteración
    1. -1, 5, 10, 12, 4, 10, -1, 7, 5, 12, No hubo intercambio
    2. -1, 5, 10, 12, 4, 10, -1, 7, 5, 12, No hubo intercambio
    3. -1, 5, 10, 12, 4, 10, -1, 7, 5, 12, No hubo intercambio
    4. -1, 5, 10, 4, 12, 10, -1, 7, 5, 12, Hubo intercambio
    5. -1, 5, 10, 4, 10, 12, -1, 7, 5, 12, Hubo intercambio
    6. -1, 5, 10, 4, 10, -1, 12, 7, 5, 12, Hubo intercambio
    7. -1, 5, 10, 4, 10, -1, 7, 12, 5, 12, Hubo intercambio
    8. -1, 5, 10, 4, 10, -1, 7, 5, 12, 12, Hubo intercambio
    9. -1, 5, 10, 4, 10, -1, 7, 5, 12, 12, No hubo intercambio
  2. Iteración
    1. -1, 5, 10, 4, 10, -1, 7, 5, 12, 12, No hubo intercambio
    2. -1, 5, 10, 4, 10, -1, 7, 5, 12, 12, No hubo intercambio
    3. -1, 5, 4, 10, 10, -1, 7, 5, 12, 12, Hubo intercambio
    4. -1, 5, 4, 10, 10, -1, 7, 5, 12, 12, No hubo intercambio
    5. -1, 5, 4, 10, -1, 10, 7, 5, 12, 12, Hubo intercambio
    6. -1, 5, 4, 10, -1, 7, 10, 5, 12, 12, Hubo intercambio
    7. -1, 5, 4, 10, -1, 7, 5, 10, 12, 12, Hubo intercambio
    8. -1, 5, 4, 10, -1, 7, 5, 10, 12, 12, No hubo intercambio
  3. Iteración
    1. -1, 5, 4, 10, -1, 7, 5, 10, 12, 12, No hubo intercambio
    2. -1, 4, 5, 10, -1, 7, 5, 10, 12, 12, Hubo intercambio
    3. -1, 4, 5, 10, -1, 7, 5, 10, 12, 12, No hubo intercambio
    4. -1, 4, 5, -1, 10, 7, 5, 10, 12, 12, Hubo intercambio
    5. -1, 4, 5, -1, 7, 10, 5, 10, 12, 12, Hubo intercambio
    6. -1, 4, 5, -1, 7, 5, 10, 10, 12, 12, Hubo intercambio
    7. -1, 4, 5, -1, 7, 5, 10, 10, 12, 12, No hubo intercambio
  4. Iteración
    1. -1, 4, 5, -1, 7, 5, 10, 10, 12, 12, No hubo intercambio
    2. -1, 4, 5, -1, 7, 5, 10, 10, 12, 12, No hubo intercambio
    3. -1, 4, -1, 5, 7, 5, 10, 10, 12, 12, Hubo intercambio
    4. -1, 4, -1, 5, 7, 5, 10, 10, 12, 12, No hubo intercambio
    5. -1, 4, -1, 5, 5, 7, 10, 10, 12, 12, Hubo intercambio
    6. -1, 4, -1, 5, 5, 7, 10, 10, 12, 12, No hubo intercambio
  5. Iteración
    1. -1, 4, -1, 5, 5, 7, 10, 10, 12, 12, No hubo intercambio
    2. -1, -1, 4, 5, 5, 7, 10, 10, 12, 12, Hubo intercambio
    3. -1, -1, 4, 5, 5, 7, 10, 10, 12, 12, No hubo intercambio
    4. -1, -1, 4, 5, 5, 7, 10, 10, 12, 12, No hubo intercambio
    5. -1, -1, 4, 5, 5, 7, 10, 10, 12, 12, No hubo intercambio
  6. Iteración
    1. -1, -1, 4, 5, 5, 7, 10, 10, 12, 12, No hubo intercambio
    2. -1, -1, 4, 5, 5, 7, 10, 10, 12, 12, No hubo intercambio
    3. -1, -1, 4, 5, 5, 7, 10, 10, 12, 12, No hubo intercambio
    4. -1, -1, 4, 5, 5, 7, 10, 10, 12, 12, No hubo intercambio

Burbuja convencional

  1. Iteración
    1. -1, 5, 10, 12, 4, 10, -1, 7, 5, 12, No hubo intercambio
    2. -1, 5, 10, 12, 4, 10, -1, 7, 5, 12, No hubo intercambio
    3. -1, 5, 10, 12, 4, 10, -1, 7, 5, 12, No hubo intercambio
    4. -1, 5, 10, 4, 12, 10, -1, 7, 5, 12, Hubo intercambio
    5. -1, 5, 10, 4, 10, 12, -1, 7, 5, 12, Hubo intercambio
    6. -1, 5, 10, 4, 10, -1, 12, 7, 5, 12, Hubo intercambio
    7. -1, 5, 10, 4, 10, -1, 7, 12, 5, 12, Hubo intercambio
    8. -1, 5, 10, 4, 10, -1, 7, 5, 12, 12, Hubo intercambio
    9. -1, 5, 10, 4, 10, -1, 7, 5, 12, 12, No hubo intercambio
  2. Iteración
    1. -1, 5, 10, 4, 10, -1, 7, 5, 12, 12, No hubo intercambio
    2. -1, 5, 10, 4, 10, -1, 7, 5, 12, 12, No hubo intercambio
    3. -1, 5, 4, 10, 10, -1, 7, 5, 12, 12, Hubo intercambio
    4. -1, 5, 4, 10, 10, -1, 7, 5, 12, 12, No hubo intercambio
    5. -1, 5, 4, 10, -1, 10, 7, 5, 12, 12, Hubo intercambio
    6. -1, 5, 4, 10, -1, 7, 10, 5, 12, 12, Hubo intercambio
    7. -1, 5, 4, 10, -1, 7, 5, 10, 12, 12, Hubo intercambio
    8. -1, 5, 4, 10, -1, 7, 5, 10, 12, 12, No hubo intercambio
  3. Iteración
    1. -1, 5, 4, 10, -1, 7, 5, 10, 12, 12, No hubo intercambio
    2. -1, 4, 5, 10, -1, 7, 5, 10, 12, 12, Hubo intercambio
    3. -1, 4, 5, 10, -1, 7, 5, 10, 12, 12, No hubo intercambio
    4. -1, 4, 5, -1, 10, 7, 5, 10, 12, 12, Hubo intercambio
    5. -1, 4, 5, -1, 7, 10, 5, 10, 12, 12, Hubo intercambio
    6. -1, 4, 5, -1, 7, 5, 10, 10, 12, 12, Hubo intercambio
    7. -1, 4, 5, -1, 7, 5, 10, 10, 12, 12, No hubo intercambio
  4. Iteración
    1. -1, 4, 5, -1, 7, 5, 10, 10, 12, 12, No hubo intercambio
    2. -1, 4, 5, -1, 7, 5, 10, 10, 12, 12, No hubo intercambio
    3. -1, 4, -1, 5, 7, 5, 10, 10, 12, 12, Hubo intercambio
    4. -1, 4, -1, 5, 7, 5, 10, 10, 12, 12, No hubo intercambio
    5. -1, 4, -1, 5, 5, 7, 10, 10, 12, 12, Hubo intercambio
    6. -1, 4, -1, 5, 5, 7, 10, 10, 12, 12, No hubo intercambio
  5. Iteración
    1. -1, 4, -1, 5, 5, 7, 10, 10, 12, 12, No hubo intercambio
    2. -1, -1, 4, 5, 5, 7, 10, 10, 12, 12, Hubo intercambio
    3. -1, -1, 4, 5, 5, 7, 10, 10, 12, 12, No hubo intercambio
    4. -1, -1, 4, 5, 5, 7, 10, 10, 12, 12, No hubo intercambio
    5. -1, -1, 4, 5, 5, 7, 10, 10, 12, 12, No hubo intercambio
  6. Iteración
    1. -1, -1, 4, 5, 5, 7, 10, 10, 12, 12, No hubo intercambio
    2. -1, -1, 4, 5, 5, 7, 10, 10, 12, 12, No hubo intercambio
    3. -1, -1, 4, 5, 5, 7, 10, 10, 12, 12, No hubo intercambio
    4. -1, -1, 4, 5, 5, 7, 10, 10, 12, 12, No hubo intercambio
  7. Iteración
    1. -1, -1, 4, 5, 5, 7, 10, 10, 12, 12, No hubo intercambio
    2. -1, -1, 4, 5, 5, 7, 10, 10, 12, 12, No hubo intercambio
    3. -1, -1, 4, 5, 5, 7, 10, 10, 12, 12, No hubo intercambio
  8. Iteración
    1. -1, -1, 4, 5, 5, 7, 10, 10, 12, 12, No hubo intercambio
    2. -1, -1, 4, 5, 5, 7, 10, 10, 12, 12, No hubo intercambio
  9. Iteración
    1. -1, -1, 4, 5, 5, 7, 10, 10, 12, 12, No hubo intercambio
Ordenado: -1, -1, 4, 5, 5, 7, 10, 10, 12, 12,