import java.util.Arrays; /* Insert the next unsorted element into its correct position in the sorted portion by moving back all the values greter than it. Takes O(n^2) steps in the worse case, but could take fewer steps. */ public final class Insertion { // sort data[0]..data[n-1] into ascending order public static void insertSort (int [] data) { final int n = data.length; for (int i=1; i0 && t