Question: Suppose that you have two algorithms A and B that solve the same problem. Algorithm A has worst case mining time T_A(n) = 2n^2 -
Suppose that you have two algorithms A and B that solve the same problem. Algorithm A has worst case mining time T_A(n) = 2n^2 - 2n + 1 and Algorithm B has worst case mining time T_B(n) = n^2 + n - 1. Show that both T_A(n) and T_B (n) are in O(n^2). Show that T_A(n) = 2n^2 + O(n) and T_B(n) = n^2 + O(n). Explain which algorithm is preferable
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
