What Is Sorting?

This section describes what is sorting - A process to organize a collection of data elements based on the order of a comparable property of each element.

What Is Sorting? Sorting is to organize a collection of data elements based on the order of a comparable property of each element.

There are three concepts in this definition:

Examples of sorting:

A yellow-page book:

An English dictionary:

Warning: For certain types of data elements, the comparable property is not so easy to find. For example, what is the comparable property that can be used to sort the characters in a Chinese dictionary?

Last update: 2011.

Table of Contents

 About This Book

Introduction of Sorting Algorithms

What Is Sorting?

 Why Sorting Is Needed?

 Most Popular 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

 Performance Summary of Java Implementations

 References

 PDF Printing Version