Dec 15, 2008

O(n^2) or O(4^(logn to the base 2) which one is faster?

O(n^2) or O(4^(logn to the base 2) which one is faster?

They are same.
4^(logn to base 2)=2^(2*logn)=2^log(n^2)=n^2
2logn=logn^2 ??? interesting

No comments:

Post a Comment