Question: Q . Programs A and B are analyzed and found to have worst - case running times no greater than 1 5 0 ( nlogn
Q Programs A and B are analyzed and found to have worstcase running times no greater than nlogn and n respectively.
Which of the following statements does the analysis imply?
a Program A will run faster on average for sufficiently large n
b Program B will run faster on average for small n
c Program A is probably simpler to code than program B
d There exists some input for which program B takes longer than program A
e none of the above
Q An algorithm takes seconds for an input size of
If the algorithm is quadratic, approximately how long does it take to solve a problem of size
a seconds
b seconds
c seconds
d seconds
e none of the above
Q An algorithm takes seconds for an input of size If the algorithm is quadratic, how large a problem can be solved in two minutes?
a
b
c
d
e none of the above
Q An algorithm takes seconds to solve a problem of size and ten minutes to solve a problem of size
What is the likely running time of the algorithm?
a constant
b linear
c quadratic
d cubic
e none of the above
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
