Easy

Bubble Sort

Bubble sort swaps adjacent items that are out of order and repeats until a pass makes no swaps.

Costs

CategoryAlgorithm
DifficultyEasy
Comparisons, worst and averageO(n²)
Best case, already sorted with an early stopO(n)
Extra memoryO(1)

Questions

What is Bubble Sort?

Bubble sort swaps adjacent items that are out of order and repeats until a pass makes no swaps.

Where do I practice it?

DSA Master keeps challenges and progress on the phone. This page is the idea and the costs.