What is O(log(n!)) and O(n!) and Stirling Approximation

O(n!) isn’t equivalent to O(n^n). It is asymptotically less than O(n^n). O(log(n!)) is equal to O(n log(n)). Here is one way to prove that: Note that by using the log rule log(mn) = log(m) + log(n) we can see that: Proof that O(log(n!)) ⊆ O(n log(n)): Which is less than: So O(log(n!)) is a subset of O(n log(n)) Proof that O(n log(n)) ⊆ O(log(n!)): Which is greater … Read more