DEV Community

Discussion on: The Gauss Sum, and Solving for the Missing Number

Collapse
 
nkhil profile image
Alex Jones

I could be wrong, but I think the guass sum equation is incorrect. It should be:

const gaussSum = (nums[nums.length - 1] * (nums[nums.length - 1] + 1)) / 2`
Enter fullscreen mode Exit fullscreen mode