-1

I see a google search pulls up a lot here but there is a lot of ambiguity on the web. Please do not mark as a duplicate.

I have seen

n log n

and

n ln n

and finally

n log(base2) n

One of the SO answers treats Big O as worst case and states n^2. Worst case is in fact n^2, but Big O does not imply worst case so in this sense it is highly voted but wrong.

To be clear, I want to know the average case and to be clear, this is for time-complexity.

Community
  • 1
  • 1

1 Answers1

0

In math you always assume the base is equal to 10.

In computer science, if the base is omitted from the logarithm, convention dictates that the base is equal to 2.

Bit of a silly question really, I'm surprised your teacher didn't address this. You can use any of the three Big-O runtimes in your original post because they all mean the same exact thing.