Sorting Algorithms

Basic issue: How to sort a given list of numbers (Objects in general) into an ascending (or descending) order.


References: There are many good web sites that give various sorting algorithms complete with visually stunning applets and demos. Below are a few prominent ones:

http://www.cs.ubc.ca/spider/harrison/Java/sorting-demo.html

http://ciips.ee.uwa.edu.au/~morris/Year2/PLDS210/ds_ToC.html

http://www.csse.monash.edu.au/courseware/cse2304/

http://cg.scs.carleton.ca/~morin/misc/sortalg/



Insertion Sort
Bubble Sort
Shell Sort

These algorithms generally have O(n2) complexity.

These algorithms are conceptually easy, and uses simple data structures.


Heap Sort
Merge Sort
Quick Sort

These algorithms have O(n log(n)) complexity

Conceptually complex, uses more advanced data structures.