Source of 8.11.java


  1: public static <T extends Comparable<? super T>>
  2:        void insertionSort(T[] a, int first, int last)
  3: {
  4:    if (first < last)
  5:    {
  6:       // Sort all but the last entry
  7:       insertionSort(a, first, last - 1);
  8: 
  9:       // Insert the last entry in sorted order
 10:       insertInOrder(a[last], a, first, last - 1); 
 11:    } // end if
 12: } // end insertionSort
 13: // Version 4.0