Question: Programs A and B are analyzed and found to have worst-case running times no greater than 150N log2 N and N2, respectively. Answer the following
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?
Step by Step Solution
3.55 Rating (159 Votes )
There are 3 Steps involved in it
a A b B c The informati... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (1 attachment)
1486-C-S-A(270).docx
120 KBs Word File
