Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

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.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Shell Sort

Algorithm for sorting
by

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
iterator++
}
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*//
iterator++
}
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.
<http://www.itl.nist.gov/div897/sqg/dads/HTML/shellsort.html>

Briscoe, Wesley. "YouTube - Shell Sort with 7 Items.AVI." YouTube -
Broadcast Yourself. 13 Jan. 2010. Web. 02 May 2010.
<http://www.youtube.com/watch?v=wdrwwl5Ib9g>.

Corman, Thomas H. "Sorting and Searching Algorithms." EPaperPress.
Web. 02 May 2010.
<http://epaperpress.com/sortsearch/index.html>.

"Shell Sort Algorithm." Games & Game Programming. Web. 02 May
2010.
<http://www.gamespp.com/algorithms/shellSortAlgorithm.html>.

"Shell Sort." Wikipedia, the Free Encyclopedia. Web. 03 May 2010.
<http://en.wikipedia.org/wiki/Shell_sort>.

"YouTube - Algorithms Lesson 2: Insertion Sort." YouTube - Broadcast
Yourself. 14 Apr. 2009. Web. 02 May 2010.
<http://www.youtube.com/watch?v=c4BRHC7kTaQ>.

"YouTube - Shell Sort." YouTube - Broadcast Yourself. 8 Dec. 2009. Web.
02 May 2010.
<http://www.youtube.com/watch?v=cV6UxwdkLuc>.
Full transcript