Programs A and B are analyzed and found to have worst-case running times no greater than 150N
Question:
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 that program B will run faster than program A on all possible inputs?
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Data Structures and Algorithm Analysis in Java
ISBN: 978-0132576277
3rd edition
Authors: Mark A. Weiss
Question Posted: