public static void quickSort(int[] arr, int left, int right) {
if(left<right){
int i=left;
int j=right;
int key=arr[left];
while(i<j){
while(arr[j]>key){
j--;
}
swap(arr,i,j);
while(arr[i]<key){
i++;
}
swap(arr,i,j);
}
quickSort(arr,left,i-1);
quickSort(arr,i+1,right);
}
}
public static void swap(int[] arr, int i, int j) {
// TODO Auto-generated method stub
int temp=arr[i];
arr[i]=arr[j];
arr[j]=temp;