Question: IN JAVA USE COMPARATOR LIBRARY AND THESE FUNCTIONS AND VARIABLES: public static void mergeSort(final List list, final Comparator comparator) { // TODO } public static
IN JAVA USE COMPARATOR LIBRARY AND THESE FUNCTIONS AND VARIABLES:
public static> void mergeSort(final List list, final Comparator comparator) { // TODO } public static > void mergeSort(final T[] array, final Comparator comparator) { // TODO }
Implement the Mergesort algorithm for both generic lists and generic arrays
Provide the theoretical, best, worst and average time complexity in Big O notation, as well as providing an explanation as to how each of those time complexities were determined.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
