Learn
Practice
Interview
Resources
Newsletter
F
Toggle theme
0
F
0
Toggle menu
Animations
← Back to All Animations
Shell Sort
Bookmark
Input
Standard
Small
Reverse Sorted
Already Sorted
Nearly Sorted
All Equal
Custom
arr
=
[23, 12, 42, 4, 9, 30, 5, 17]
0
1
2
3
4
5
6
7
23
12
42
4
9
30
5
17
0
1
2
3
4
5
6
7
23
12
42
4
9
30
5
17
gap =
4
key =
30
0
1
2
3
4
5
6
7
23
12
42
4
9
5
17
30
j
i
12
>
30
?
gap =
4
key =
17
0
1
2
3
4
5
6
7
23
12
42
4
9
30
5
17
j
i
4
>
17
?
gap =
2
key =
4
0
1
2
3
4
5
6
7
23
12
42
9
30
5
17
4
j
i
lift key =
4
out of index
3
gap =
2
key =
30
0
1
2
3
4
5
6
7
23
12
42
4
9
5
17
30
j
i
12
>
30
?
gap =
2
key =
17
0
1
2
3
4
5
6
7
23
12
42
4
9
30
5
17
j
i
jump
2
left: j =
5
gap =
1
key =
4
0
1
2
3
4
5
6
7
23
12
42
9
30
5
17
4
j
i
key
4
drops into index
0
gap =
1
key =
23
0
1
2
3
4
5
6
7
12
42
4
9
30
5
17
23
j
i
key
23
drops into index
4
gap =
1
key =
42
0
1
2
3
4
5
6
7
23
12
4
9
30
5
17
42
j
i
23
>
42
?
0
1
2
3
4
5
6
7
23
12
42
4
9
30
5
17
Array is sorted
algo
master
.
io
Step:
Start: sort the array in ascending order with shell sort
0 / 78
Input
Standard
Small
Reverse Sorted
Already Sorted
Nearly Sorted
All Equal
Custom
arr
=
[23, 12, 42, 4, 9, 30, 5, 17]
0 / 78
algo
master
.
io
Step:
Start: sort the array in ascending order with shell sort