public class InsertionTest
extends Object
Compilation: javac InsertionTest.java
Execution: java InsertionTest 10
The method timeTrials() runs InsertionSort.sort() for arrays of random
double values. The first argument is the number of trials; the second
argument is the length of the array. Multiple trials produce more
accurate results because insertion sort's running time depends on
the input and various system effects.
% java InsertionTest 10
1024 1.89
2048 5.00
4096 3.58
8192 4.09
16384 4.83
32768 3.96