Question: We have the algorithm A, B and C. You will run the three implementations of the algorithms with inputs and do the computation and it

 We have the algorithm A, B and C. You will run

We have the algorithm A, B and C. You will run the three implementations of the algorithms with inputs and do the computation and it should print on the screen the time taken for the running of the algorithm for the below three inputs:

input 1-> 1,000,000

input 2-> 1,000,000,000

input 3-> 1,000,000,000,000,000,000

To print the time you should use something like

long startTime = System.currentTimeMillis(); methodA(1000000); long endTime = System.currentTimeMillis(); System.out.println("That method A for 1,000,000 took " + (endTime - startTime) + " milliseconds");

Your submission for part a should be the java file/files for solving the problem, an actual list of the running times for all the 3*3 possibilities (3 algorithm*3 imputs each

Algorithm A Algorithm B Algorithm C

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!