Take out a piece of paper. We’ll be programming on paper.
In your teams write a generic Java class ArraySorter<E> that has one method:
public void insertionSort(E[] data, Comparator<E> c);Remember Comparator is the following interface.
public interface Comparator<E> {
int compare(E o1, E o2);
}The insertionSort method must use the insertion sort algorithm to sort the data array. What are the steps in the insertion sort?
Answer the following questions: