A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

New answers tagged


Your expression is $$ E = \frac{cn^2}{\log \frac{n(n+1)}{2}}$$ where $c$ is some constant. The simple upper bound for $E$ is $$ E\le c n^2$$ which implies that $\mathcal{O}(n^2)$. For a better bound $$E = \frac{cn^2}{\log \frac{n(n+1)}{2}} = \frac{cn^2}{ 2 \log n + \log n - \log 2 } $$ Now it is an easy verification that $E$ is $\mathcal{O}(\frac{n^...

Top 50 recent answers are included