3 ms·
I think he meant factorial rather than sum. The sum of the numbers is O(1) - you can calculate it algorithmically. N*(N+1)/2 Ref: http://www.wikihow.com/Sum-
by gvb 13y ago
I think he meant factorial rather than sum.
The sum of the numbers is O(1) - you can calculate it algorithmically.
N*(N+1)/2
Ref: http://www.wikihow.com/Sum-the-Integers-from-1-to-N http://www.wikihow.com/Sum-the-Integers-from-1-to-N
- gregors 13y agohttps://math.stackexchange.com/questions/195924/proving-a-factorial-is-not-a-certain-complexity https://math.stackexchange.com/questions/195924/proving-a-fa...