Loading presentation...

Present Remotely

Send the link below via email or IM


Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.


Shell Sort

Algorithm for sorting

Rahul Patel

on 4 May 2010

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Shell Sort

How Insertion Sort Works How Shell Sort Works Insertion Sort vs. Shell Sort iterator = 1
/*Sort is repeated for the 2nd element to the final element in the list*/
while (iterator is less than ListLength) {
temp = List[iterator]
index = iterator

/*Determines if a shift and swap needs to
be made*/
while (temp is less than Previous List Value) {
//Values are copied one element to the right

/*After all values are shifted, sorted value is put
into place*/
a[index] = temp
gapsize = ListLength / 2
while (gapsize is greater than or equal to 1) {
/*Last Insertion Sort to complete is of gapsize 1 (regular insertion sort)*/

iterator = gapsize
/*Sets first comparable element to the first one in the
second row*/

while (iterator is less than ListLength) {
//*Perform Insertion Sort Upon Each Column of the list*//
gapsize = gapsize / 2
//creates new gapsize for next Insertion Sort
} Works Cited

Black, Paul E. "Shell Sort." National Institute of Standards and
Technology. 4 Sept. 2009. Web. 02 May 2010.

Briscoe, Wesley. "YouTube - Shell Sort with 7 Items.AVI." YouTube -
Broadcast Yourself. 13 Jan. 2010. Web. 02 May 2010.

Corman, Thomas H. "Sorting and Searching Algorithms." EPaperPress.
Web. 02 May 2010.

"Shell Sort Algorithm." Games & Game Programming. Web. 02 May

"Shell Sort." Wikipedia, the Free Encyclopedia. Web. 03 May 2010.

"YouTube - Algorithms Lesson 2: Insertion Sort." YouTube - Broadcast
Yourself. 14 Apr. 2009. Web. 02 May 2010.

"YouTube - Shell Sort." YouTube - Broadcast Yourself. 8 Dec. 2009. Web.
02 May 2010.
Full transcript