Learn
Practice
Interview
Resources
Newsletter
F
Toggle theme
0
F
0
Toggle menu
Animations
← Back to All Animations
Quick Sort
Bookmark
Input
Standard
Small
Reverse Sorted
Already Sorted
Nearly Sorted
All Equal
Custom
arr
=
[33, 10, 55, 26, 17, 42, 24]
0
1
2
3
4
5
6
33
10
55
26
17
42
24
0
1
2
3
4
5
6
33
10
55
26
17
42
24
pivot =
24
partition = [
0
..
6
]
0
1
2
3
4
5
6
i
j
33
10
55
26
17
42
24
10
≤
24
→
swap into the ≤ zone
at index
0
pivot =
24
partition = [
0
..
6
]
0
1
2
3
4
5
6
i
j
33
10
55
26
17
42
24
42
≤
24
?
pivot =
17
partition = [
0
..
1
]
0
1
2
3
4
5
6
33
10
55
26
17
42
24
i =
-1
: the
≤ pivot
zone is empty
partition = [
0
..
0
]
0
1
2
3
4
5
6
33
10
55
26
17
42
24
single element → index
0
is final
pivot =
55
partition = [
3
..
6
]
0
1
2
3
4
5
6
i
j
33
10
55
26
17
42
24
33
≤
55
→
zone grows
, already in place
pivot =
42
partition = [
3
..
5
]
0
1
2
3
4
5
6
33
10
55
26
17
42
24
pivot = arr[
5
] =
42
pivot =
42
partition = [
3
..
5
]
0
1
2
3
4
5
6
i
j
33
10
55
26
17
42
24
33
≤
42
→
zone grows
, already in place
pivot =
33
partition = [
3
..
4
]
0
1
2
3
4
5
6
j
33
10
55
26
17
42
24
26
≤
33
?
0
1
2
3
4
5
6
33
10
55
26
17
42
24
Array is sorted
algo
master
.
io
Step:
Start: sort the array with quick sort (Lomuto partition)
0 / 46
Input
Standard
Small
Reverse Sorted
Already Sorted
Nearly Sorted
All Equal
Custom
arr
=
[33, 10, 55, 26, 17, 42, 24]
0 / 46
algo
master
.
io
Step:
Start: sort the array with quick sort (Lomuto partition)