Learn
Practice
Newsletter
Resources
Mobile
New
F
Toggle theme
0
F
0
Toggle menu
Animations
← Back to All Animations
Bubble Sort
Bookmark
Input
Standard
Small
Reverse Sorted
Already Sorted
Nearly Sorted
All Equal
Custom
arr
=
[64, 34, 25, 12, 22, 11, 90]
0
1
2
3
4
5
6
64
34
25
12
22
11
90
0
1
2
3
4
5
6
64
34
25
12
22
11
90
pass =
1
swapped =
true
0
1
2
3
4
5
6
64
34
25
12
22
11
90
j
j+1
64
>
12
?
pass =
1
swapped =
true
0
1
2
3
4
5
6
64
34
25
12
22
11
90
j
j+1
64
>
90
?
pass =
2
swapped =
true
0
1
2
3
4
5
6
64
34
25
12
22
11
90
j
j+1
34
>
12
?
pass =
2
swapped =
true
0
1
2
3
4
5
6
64
34
25
12
22
11
90
j
j+1
34
>
64
?
pass =
3
swapped =
true
0
1
2
3
4
5
6
64
34
25
12
22
11
90
j
j+1
25
>
22
→
swap
, swapped =
true
pass =
4
swapped =
false
0
1
2
3
4
5
6
64
34
25
12
22
11
90
pass
4
: bubble the largest to index
3
pass =
4
swapped =
true
0
1
2
3
4
5
6
64
34
25
12
22
11
90
j
j+1
22
≤
25
→
keep
pass =
5
swapped =
true
0
1
2
3
4
5
6
64
34
25
12
22
11
90
j
j+1
12
≤
22
→
keep
0
1
2
3
4
5
6
64
34
25
12
22
11
90
Array is sorted
algo
master
.
io
Step:
Start: Sort the array in ascending order with bubble sort
0 / 55
Input
Standard
Small
Reverse Sorted
Already Sorted
Nearly Sorted
All Equal
Custom
arr
=
[64, 34, 25, 12, 22, 11, 90]
0 / 55
algo
master
.
io
Step:
Start: Sort the array in ascending order with bubble sort