Here you can find the source of quickSort(int[] source)
public static int[] quickSort(int[] source)
//package com.java2s; //License from project: LGPL public class Main { public static int[] quickSort(int[] source) { return qsort(source, 0, source.length - 1); }/*from w w w . jav a 2 s. c o m*/ private static int[] qsort(int source[], int low, int high) { int i, j, x; if (low < high) { i = low; j = high; x = source[i]; while (i < j) { while (i < j && source[j] > x) { j--; } if (i < j) { source[i] = source[j]; i++; } while (i < j && source[i] < x) { i++; } if (i < j) { source[j] = source[i]; j--; } } source[i] = x; qsort(source, low, i - 1); qsort(source, i + 1, high); } return source; } }