public void insertionSort(int[] array) #header
{
  int i, j, temp; #variables
  for (i=1; i<array.length; i++) #outerLoop
  {
    j = i; #setJ
    temp = array[i]; #takeOut
    while (j > 0 && array[j-1] > temp){ #innerLoop
      array[j] = array[j-1]; #moveForward
      j = j - 1; #decrementJ
    }
    array[j] = temp; #insert
  } #endOuterLoop
} #end