Class StraightInsertionSort


public class StraightInsertionSort
extends Object
An implementation of the straight insert sort algorithm. This is a O(N^2) algorithm and this implemenation originally came from NUmerical Recipes Third Edition. page 420. No additional data structures need to be declared. Elements are swapped in the list Only recommended for less than 20 elements
  • Constructor Details

    • StraightInsertionSort

      public StraightInsertionSort()
  • Method Details

    • sort

      public static void sort​(double[] data)
      Sorts data into ascending order