Question: Get a formula for the comparison counts, run the tester with array sizes 1 , 2 and 3 . Based on the results, solve a

Get a formula for the comparison counts, run the tester with array sizes 1,2 and 3. Based on the results, solve a system of linear equations to get the formula. Verify that the formula gives the correct comparison count for input size 120,000.
What is the array size (0 to quit)?1
How many calls per test? 10
Elapsed Time =0.0ms, comparisons =0
Time per call =0.0ms, comps / call =0
What is the array size (0 to quit)?2
How many calls per test? 10
Elapsed Time =0.0ms, comparisons =10
Time per call =0.0ms, comps / call =1
What is the array size (0 to quit)?3
How many calls per test? 10
Elapsed Time =0.0ms, comparisons =30
Time per call =0.0ms, comps / call =3
input size 120,000's comparisons =71999400000
comps /call=7199940000

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!