Answer:
Here is the basics of insertionSort performed on an array of integers, this should get you started:
/**
* The insertionSort method performs an insertion sort on an int array. The
* array is sorted in ascending order.
*
* param array The array to sort.
*/
public static void insertionSort(int[] array) {
int unsortedValue;
int scan;
for (int index = 1; index < array.length; index++) {
unsortedValue = array[index];
scan = index;
while (scan > 0 && array[scan - 1] > unsortedValue) {
array[scan] = array[scan - 1];
scan--;
}
array[scan] = unsortedValue;
}
}