@Test public void randomOrderSort() { Integer[] array = { 5, 1, 3, 2, 4 }; Integer[] sorted = QuickSort.quickSort(array, ascOrderComparator); assertArrayEquals("Failure => Array returned is not sorted.", sorted, new Integer[] { 1, 2, 3, 4, 5 }); }
public static <T> T[] quickSort(T[] array, Comparator<T> comparator) { return quickSort(array, 0, array.length - 1, comparator); }
QuickSort { public static <T> T[] quickSort(T[] array, Comparator<T> comparator) { return quickSort(array, 0, array.length - 1, comparator); } }
QuickSort { public static <T> T[] quickSort(T[] array, Comparator<T> comparator) { return quickSort(array, 0, array.length - 1, comparator); }  }
QuickSort { public static <T> T[] quickSort(T[] array, Comparator<T> comparator) { return quickSort(array, 0, array.length - 1, comparator); }  static T[] quickSort(T[] array, Comparator<T> comparator); static int partition(T[] array, int startIndex, int endIndex,
			Comparator<T> comparator, int pivotIndex); }
QuickSort { public static <T> T[] quickSort(T[] array, Comparator<T> comparator) { return quickSort(array, 0, array.length - 1, comparator); }  static T[] quickSort(T[] array, Comparator<T> comparator); static int partition(T[] array, int startIndex, int endIndex,
			Comparator<T> comparator, int pivotIndex);  }