import java.util.*; class QuickSort10 // Destructive quick sort on a random ArrayList of integers // Timed but not printed { public static void main(String[] args) throws Exception { Random rand = new Random(); long time1,time2; Scanner input = new Scanner(System.in); System.out.print("Enter the number of numbers: "); int num = input.nextInt(); System.out.print("Enter the highest number: "); int high = input.nextInt(); ArrayList a = new ArrayList(); for(int i=0; i a) { sort(a,0,a.size()); } private static void sort(ArrayList a,int from,int to) { if(to>from+1) { Integer pivot = a.get(from); int low=from+1,high=to-1; while(low a,int pos1,int pos2) { Integer temp = a.get(pos1); a.set(pos1,a.get(pos2)); a.set(pos2,temp); } }