com.mhhe.clrs2e
Class InsertionSort

java.lang.Object
  |
  +--com.mhhe.clrs2e.InsertionSort
All Implemented Interfaces:
Sorter

public class InsertionSort
extends java.lang.Object
implements Sorter

Implements the Sorter interface via insertion sort from page 17 of Introduction to Algorithms, Second edition.


Constructor Summary
InsertionSort()
           
 
Method Summary
 void sort(java.lang.Comparable[] array)
          Sorts an array of Comparable objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InsertionSort

public InsertionSort()
Method Detail

sort

public void sort(java.lang.Comparable[] array)
Sorts an array of Comparable objects.

Specified by:
sort in interface Sorter
Parameters:
array - The array of Comparable objects to be sorted.