Is Big O(logn) log base e?

BuckFilledPlatypus picture BuckFilledPlatypus · Oct 15, 2009 · Viewed 40.6k times · Source

For binary search tree type of data structures, I see the Big O notation is typically noted as O(logn). With a lowercase 'l' in log, does this imply log base e (n) as described by the natural logarithm? Sorry for the simple question but I've always had trouble distinguishing between the different implied logarithms.

Answer

Cade Roux picture Cade Roux · Oct 15, 2009

Big O notation is not affected by logarithmic base, because all logarithms in different bases are related by a constant factor, O(ln n) is equivalent to O(log n).

enter image description here