//This program compares the execution time of //Quick sort and Selection sort on different input sizes. //For each input size, it generate 25 random instances of array //and calculate the time taken by Quick sort and Selection sort //on all of them. Note that We execute the two algorithms on same input. //It uses System.currentTimeMillis() which returns //a long integer corresponding to the curent time in milli seconds. //Compile it and execute it to see the output. import java.util.Random; class Comparing_sorting_algo { public static int index_of_smallest_value(int[] B,int start, int end) { int index_of_smallest = start; int index = start+1; for(;index<=end; index=index+1) { if(B[index_of_smallest] > B[index]) index_of_smallest = index; } return index_of_smallest; } public static void swap(int[] A, int i, int j) { int temp = A[i]; A[i] = A[j]; A[j] = temp; } public static int partition (int[] A, int left, int right) { int pivot=A[right]; int NSE_index = left; for(int i = left; i<=right-1; i=i+1) { if(A[i]<=pivot) { swap(A,i,NSE_index); NSE_index = NSE_index + 1; } } swap(A,right,NSE_index); return NSE_index; } public static void Qsort(int[] A, int left, int right) { if(left