import java.util.*; class InsertSort3 // Constructive insertion 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 b=sort(a); time2 = new Date().getTime(); System.out.println("Time taken to sort: "+(time2-time1)+"ms"); } public static ArrayList sort(ArrayList a) { ArrayList b = new ArrayList(); for(int i=0; i a) { int i; for(i=0; i