Shell Sort - Algorithm Introduction

This section describes the Shell Sort algorithm - A complex and fast sorting algorithm that repeatedly divides the entire collection into sub-collections by taking every h-th element for a fixed gap h and performs an insertion sort each sub-collection.

Shell Sort is a complex and fast sorting algorithm that repeatedly divides the entire collection into sub-collections by taking every h-th element for a fixed gap h and performs an insertion sort each sub-collection. The Quicksort algorithm was published by Donald Shell in 1959.

The basic idea of Shell Sort algorithm can be described as these steps:

1. Set a step size h that is smaller than the number of elements to be sorted, and greater that 1.

2. Group the entire collection of data elements in h groups by putting elements that are h steps away from each other into the same group.

3. Sort each group by exchanging locations of elements in the same group.

4. Repeat step 2 and 3 with a smaller step size h until h becomes 1.

This idea of sorting is based on the following facts:

Last update: 2011.

Table of Contents

 About This Book

 Introduction of Sorting Algorithms

 Java API for Sorting Algorithms

 Insertion Sort Algorithm and Implementation

 Selection Sort Algorithm and Implementation

 Bubble Sort Algorithm and Implementation

 Quicksort Algorithm and Implementation

 Merge Sort Algorithm and Implementation

 Heap Sort Algorithm and Implementation

Shell Sort Algorithm and Implementation

Shell Sort - Algorithm Introduction

 Shell Sort - Java Implementation

 Shell Sort - Performance

 Shell Sort - Implementation Improvements

 Performance Summary of Java Implementations

 References

 PDF Printing Version