3 ms·
what about (n(n+1)/2)< 1000 n^2 ? .
by randomthought 13y ago
what about (n(n+1)/2)< 1000 n^2 ? .
- thedufer 13y agoHe interpreted it as "the time complexity of computing the sum of the numbers from 1 to n", which using the formula you just gave takes O(1) time.