Put in order · Python course · Module 2: Data Structures

Bubble Sort - Steps

Arrange the Bubble Sort algorithm steps in order:

Items to put in order

  • Stop when no swaps are made
  • Compare adjacent elements
  • Repeat for the entire list
  • Swap them if they are in the wrong order
Show the answer

Correct order:

  1. Compare adjacent elements
  2. Swap them if they are in the wrong order
  3. Repeat for the entire list
  4. Stop when no swaps are made