Insertion Sort
public class InsertionSort {
public static void insertionSort(ArrayList<Integer> array) {
boolean swapped = true;
for (int i = 0; i <= array.size(); i++) {
int currentValue = array[i];
int j = i - 1;
while (j >= 0 && array[j] > currentValue) {
array[j + 1] = array[j];
j--;
}
array[j + 1] = currentValue;
}
}
}