which is best algorithm?
- by Lopa
Consider two algorithms A and B which solve the same problem, and have time complexities
(in terms of the number of elementary operations they perform) given
respectively by
a(n) = 9n+6
b(n) = 2(n^2)+1
(i) Which algorithm is the best asymptotically?
(ii) Which is the best for small input sizes n, and for what values of n is this the
case? (You may assume where necessary that n0.)
i think its 9n+6. guys could you please help me with whether its right or wrong??
and whats the answer for part b. what exactly do they want?