Here you can find the source of quickSort(int[] arr, int left, int right)
public static int[] quickSort(int[] arr, int left, int right)
//package com.java2s; //License from project: Open Source License public class Main { public static int[] quickSort(int[] arr, int left, int right) { int dp;/*from ww w . j av a 2 s . c o m*/ if (left < right) { dp = partition(arr, left, right); quickSort(arr, left, dp - 1); quickSort(arr, dp + 1, right); } return arr; } public static int partition(int n[], int left, int right) { int pivot = n[left]; while (left < right) { while (left < right && n[right] >= pivot) right--; if (left < right) n[left++] = n[right]; while (left < right && n[left] <= pivot) left++; if (left < right) n[right--] = n[left]; } n[left] = pivot; return left; } }