import edu.gwu.stat.*; import java.util.*; public class MaxDifference2 { static double[] makeRandomArray (int length) { double[] A = new double [length]; for (int i=0; i"); // System.exit(0); } try { int length = Integer.parseInt (argv[0]); double[] A = makeRandomArray (length); long startTime = System.currentTimeMillis(); algorithm2 (A); double timeTaken = System.currentTimeMillis() - startTime; System.out.println ("Algorithm 1: timeTaken=" + timeTaken); } catch (Exception e) { System.out.println (e); } } }