⚡ AlgoZen_
~/home/sorting_algorithms/bubble_sort1 / 7

Bubble Sort

Beginner

Repeatedly step through the list, compare adjacent elements and swap them if out of order. The largest elements "bubble up" to the end each pass.

time:O(n²)
space:O(1)
⚡ +100_XP
step[1/43]
> Start
64
34
25
12
22
11
90
Starting array. We will bubble the largest element to the end each pass.

// tap NEXT STEP to walk through one step at a time