Sorting algorithms/Quicksort: Difference between revisions

Undo revision 158141 by Zenlang (talk) The array definitely has to be not empty to get sorted
(Undo revision 158141 by Zenlang (talk) The array definitely has to be not empty to get sorted)
Line 1,523:
 
<lang java5>public static <E extends Comparable<? super E>> List<E> quickSort(List<E> arr) {
if (!arr.sizeisEmpty() <= 1) {
E pivot = arr.get(0); //This pivot can change to get faster results
Anonymous user