Isn't O(log(n)) equivalent to O(sqrt(n))?
No. Just as (e^n) grows faster (in the limit) than any polynomial of n, such as n^2 or n^100; likewise, log(n) grows slower than any polynomial of n, such as sqrt(n) = n^(1/2), or even n^(1/100). They are both practically pretty slow-growing, though. It may well be that for practical sizes, constant factors matter more than the asymptotic difference on present computers.
But I actually wanted to respond to this:
> log(n) grows slower than any polynomial of n, such as sqrt(n) = n^(1/2)
It's correct to say that log(n) grows slower than any positive exponent of n, but what you've said is wrong in two ways:
- f(n) = n^(1/2) is not a polynomial, as a polynomial in n can only feature nonnegative integer exponents of n.
- f(n) = 300 is a polynomial in n, but it grows more slowly than log(n). (It's also larger, for any plausible value of n at all. So constant factors do matter, but the difference between log(n) and sqrt(n) is quite noticeable.)