Quicksort - Algorithm Introduction

This section describes the Quicksort algorithm - A complex and fast sorting algorithm that repeatedly divides an un-sorted section into a lower order sub-section and a higher order sub-section by comparing to a pivot element.

Quicksort is a complex and fast sorting algorithm that repeatedly divides an un-sorted section into a lower order sub-section and a higher order sub-section by comparing to a pivot element. The Quicksort algorithm was developed in 1960 by Tony Hoare while in the Soviet Union, as a visiting student at Moscow State University.

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

1. Select an element as a pivot element.

2. Data elements are grouped into two sections: one with elements that are in lower order than the pivot element, one with element that are in higher order than the pivot element.

3. Sort the two sections separately by repeating step 1 and 2.

Obviously, this is a recursive idea, where a problem is divided into smaller problems. And the division will be repeated to make the smaller problems even smaller, until they are smaller enough so that the solutions are obvious.

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

Quicksort - Algorithm Introduction

 Quicksort - Java Implementation

 Quicksort - Performance

 Quicksort - Implementation Improvements

 Merge Sort Algorithm and Implementation

 Heap Sort Algorithm and Implementation

 Shell Sort Algorithm and Implementation

 Performance Summary of Java Implementations

 References

 PDF Printing Version