Algorithm A performs 10n2 basic operations and algorithm B p
Solution
Answer:
A\'s Performance = 10n^2
B\'s Performance = 300logn
If we represent A\'s performance = g(n)
B\'s performance = f(n)
Now f(n) = O(g(n)
which means f(n) < = c*g(n)
= > 300 logn < = 10n^2
Check the larger values of n 300logn will be always lesser than 10n^2 so 300logn of B performance is always better than 10n^2 of A.

