0% found this document useful (0 votes)
10 views5 pages

Shell

The document describes the Shell Sorting algorithm, outlining its steps from initializing the gap size to sorting sub-lists using insertion sort and ultimately printing the sorted list. An example is provided to illustrate the sorting process with a specific list of numbers. Responsibilities for different sections of the document are assigned to group members, and citations for sources are included.

Uploaded by

glober3434
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views5 pages

Shell

The document describes the Shell Sorting algorithm, outlining its steps from initializing the gap size to sorting sub-lists using insertion sort and ultimately printing the sorted list. An example is provided to illustrate the sorting process with a specific list of numbers. Responsibilities for different sections of the document are assigned to group members, and citations for sources are included.

Uploaded by

glober3434
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Shell Sorting

Group #4
By Atharva Khare, Jy,
Priyanka Keshavan,
Manickavasagan
How it Works:
Algorithm
Step 1 − Start.
Step 2 − Initialize the value of gap size,
say h.
Step 3 − Divide the list into smaller
sub-part. Each must have equal
SHELL SORTING intervals to h.
Step 4 − Sort these sub-lists using
insertion sort.
Step 5 – Repeat this step 2 until the list
is sorted.
Step 6 – Print a sorted list.
Step 7 – Stop.
Example [22, 7, 9, 13, 16]

Start with a big gap (let’s Reduce gap to 1


use a gap of 2) ● Compare 9 and 7: Swap
● Compare 22 and 9: them. Compare 7 and
Swap them since 22 is 22: No swap needed.
larger. Compare 7 and Compare 22 and 13:
13: No swap needed. Swap them. Compare 22
Compare 9 and 16: No and 16: Swap them.
swap needed.
The list now looks like: [7, 9,
The list now looks like: [9, 7, 13, 16, 22]
22, 13, 16]
Responsibilities
Priyanka Jy
Algorithm Example

BETA FINAL
RELEASE VERSION

Atharva Manickavasagan
Title Slide Citation
Responsibilities Research
Citations

● “Shell Sort.” GeeksforGeeks, GeeksforGeeks, 11 July 2024,


www.geeksforgeeks.org/shell-sort/.

● WSCubeTech. “Shell Sort: Algorithm, Example, Complexity, Code.”


WsCube Tech, 18 Sept. 2024,
www.wscubetech.com/resources/dsa/shell-sort.

You might also like