Simple Sorting Practice Quiz

Practice Problem

public static <E> void bubbleSort(E[] data, Comparator<E> compare);

The method must use the Bubble Sort algorithm to sort the data array.

Remember the Comparator<E> interface defines the following method:

int compare(E o1, E o2); // Returns negative if o1 < o2, 0 if equal, positive if o1 > o2

Time Remaining:

You can restart the timer by reloading the page.

Try to complete the problem in 25 minutes.

If you cannot complete the program in 25 minutes, you can watch me solve the problem in a text editor.