Lab 1 from Java 2, implementing the insertion sort algorithm