/* Copyright (C) Deepali Srivastava - All Rights Reserved This code is part of DSA course available on CourseGalaxy.com */ import java.util.Scanner; public class QuickSort { private QuickSort(){} //this class is not for instantiation public static void sort(int[] a, int n) { sort(a,0,n-1); } private static void sort(int a[],int low,int up) { if(low>=up) /*zero or one element in sublist*/ return; int p = partition(a,low,up); sort(a,low,p-1); /*Sort left sublist*/ sort(a,p+1,up); /*Sort right sublist*/ } private static int partition(int[] a, int low, int up) { int temp,i,j,pivot; pivot=a[low]; i=low+1; /*moves from left to right*/ j=up; /*moves from right to left*/ while(i<=j) { while( a[i] pivot ) j--; if(i