Question: programs A and B are analyzed and found to have worst-case running times no greater than 150Nlong_2N and N^2, respectively. Answer the following questions, if
programs A and B are analyzed and found to have worst-case running times no greater than 150Nlong_2N and N^2, respectively. Answer the following questions, if possible
a. Which program has the better guarantee on the running time, for large values of N(N>10,000)?
b. Which program has the better guarantee on the running time, for small values of N(N<100)?
c. Which program will run faster on average for N = 1,000?
d. Is it possible the program B and will run faster than program A on all possible inputs?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
