Question: Algorithms A and B are both applicable algorithms to your problem. A is O (n^2) on average and B is O (nlogn) on average. Generally,
Algorithms A and B are both applicable algorithms to your problem. A is O (n^2) on average and B is O (nlogn) on average. Generally, you would prefer...
a. Always prefer A because the log base for B is 100, i.e. B is O (nlog100n).
b. Algorithm B in some cases and Algorithm A in most cases.
c. Algorithm A in some cases and Algorithm B in most cases.
d. To look for another algorithm which executes in a reasonable time, because these are both very expensive.
e. None of the above.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
