Is $\log n^n=O(n\log n)$?

61 Views Asked by At

Is $\log n^n=O(n\log n)$?

I know that $O(n\log n)$ is a subset of $O(n^2)$, but I don't know whether $O(n^2)$ is a subset of $\log n^n$ or not.

2

There are 2 best solutions below

0
On BEST ANSWER

We have $\log(n^n) = n\log n$. That implies, almost trivially, that $\log(n^n) = O(n\log n)$

0
On

By logarithmic identities, $\log n^n=n\log n$, so it is indeed $O(n\log n)$, more specifically with the constant being 1.