Prove or disprove $n! \in O(n^{n-2})$
I think that the statement is true so I tried calculating the limit.
So I have to calculate the limit.
$$\lim_{n\to \infty} \frac{n!}{n^{n-2}}=\lim_{n\to\infty} \frac{n!n^2}{n^{n}}$$
After that i tried substituting Stirlings approximation but it didn't end well. Could I please get some help?
Notice that $$\frac{n!}{n^n}=(\frac{1}{n})(\frac{2}{n})(\frac{3}{n})\cdots (\frac{n}{n})\leq (\frac{1}{n})(\frac{2}{n}))=\frac{2}{n^2}$$
since each term $\frac{i}{n}\leq 1$ for $1\leq i \leq n$.
So $$n! \leq 2n^{n-2}$$
and your statement follows. (Thanks to user Clement. C for all their help editing this answer =) )