Sort Complexities | LeetCode Discuss
Yeah, that's correct!
You can see this by breaking the multiplication down to individual steps:
e^n = e x e x e x ... x e x e n! = n x n-1 x n-2 x ... x 2 x 1
As you can see above, when n grows, n! easily overtakes e^n.
Read full article from Sort Complexities | LeetCode Discuss
No comments:
Post a Comment