Practice: Reading Code
Problem 1
- Write down the bugs in the following code.
Problem 2
In your teams write a generic Java class ArraySorter<E> that has one method:
Remember Comparator is the following interface.
The insertionSort method must use the insertion sort algorithm to sort the data array.
Problem 3
In your teams add the selectionSort method to your generic Java class ArraySorter<E>.
Remember Comparator is the following interface.
The selectionSort method must use the selection sort algorithm to sort the data array.
Show me your code before you leave