Section 3: Bubble

Bubble sort is a little less likely to be used by hand than the first two, but digitally it works out fine in many cases. This time you start at the end of the list and work your way forward, swapping any elements that are in the wrong order. The effect is a little bubble of swapping elements working its way forward until the list is sorted.


http://www.sorting-algorithms.com

  1. Start and the end of the list.
  2. Traverse your way to the front through all the unsorted elements.
    • Compare each element with the one before it.
    • If they are in the wrong order, swap their positions.

← Previous PageNext Page →