Hacker Newsnew | comments | show | ask | jobs | submit login

Why is O(N * N!) not written as O(N!)? It seems that N * N! < (N+1)! and we don't care about constant factors.



O(N!) is not the same thing as O((N+1)!).

O(f(N)) = O(f(N+1)) is true for exponential functions and less quickly growing functions but not for things past that. (And it's not true for sufficiently quickly decreasing functions, either, in the other direction, e.g. where f(N) = 1/N!)

-----


N is not a constant factor.

-----




Guidelines | FAQ | Support | API | Lists | Bookmarklet | DMCA | Y Combinator | Apply | Contact

Search: