O(n log n) is larger than O(log n) but smaller than O(n!). O(n!) grows faster than an exponential because in a factorial, you multiply larger and large numbers as n increases in size, whereas the exponential 2n multiplies constant numbers.
And I realized that I made a typo and missed the very important ! in my first sentence, so I guess we both need to read a bit more carefully. But yes, O(log n!) is the same as O(n log n).
View all comments
Show parent comment
2
u/bucket3432 Mar 18 '20 edited Apr 23 '20
O(n log n) is larger than O(log n) but smaller than O(n!). O(n!) grows faster than an exponential because in a factorial, you multiply larger and large numbers as n increases in size, whereas the exponential 2n multiplies constant numbers.
Edit: O(n) -> O(n!) in first sentence.