In one place I'm reading the performance of a heapsort is
N log₂(N)
and in another it says
N log N
Are they the same?
In one place I'm reading the performance of a heapsort is
N log₂(N)
and in another it says
N log N
Are they the same?
Since $\log_2(N) = \frac{ \log{N}}{\log{2}}$ for all $N$, and $\log{2}$ is only a constant, they are the same in the sense that $N \log_2{N} = O(N \log{N})$, and vice versa.