Bubble Sort

Bubble Sort Animation

 

Bubble Sort Infographic

 

Methodology

  1. Bubble up the largest number in the unsorted space

    • adjacent numbers are swapped when left number is greater than right number

  2. Reduce the unsorted space

  3. repeat 1.and 2. until the unsorted space is empty

Complexity

Time Complexity: N^2
Space Complexity: 1
Stable


Previous
Previous

Merge Sort

Next
Next

Insertion Sort