3 ms·
Isn't sum(1...n) - sum(1...n-1) just n? (1+2+3+4+5 - (1+2+3+4) = 5). That should be a +, right? This is an awesome visualization, by the way.
by tomjakubowski 9y ago
Isn't sum(1...n) - sum(1...n-1) just n? (1+2+3+4+5 - (1+2+3+4) = 5). That should be a +, right?
This is an awesome visualization, by the way.
- nhebb 9y ago> Isn't sum(1...n) - sum(1...n-1) just n? Yes. I meant n^2 = sum(1..n-1) + sum(1..n).