Skip to main content
KBY Technologies Logo

Sorting algorithms step by step

Step through bubble, insertion and merge sort on the same list and compare how much work each does.

Bubble sort

Compare each pair of neighbours and swap them if they are in the wrong order. Repeat passes until a pass makes no swaps.

  1. 77
  2. 35
  3. 78
  4. 84
  5. 86
  6. 81
  7. 25
  8. 45

The unsorted list.

Step 1 of 30
Comparisons
0
Swaps
0
List number 1

Tell the class the list number, and everyone sees the same list.

Learn the idea