Revature Interview Question

How do you sum the numbers from 1 to n?

Interview Answer

Anonymous

Aug 30, 2018

There's a sum of series formula, S = n(n+1)/2. But the interviewer didn't understand this, and was looking for a for loop.

1