blake41/eulers — comment on commit 01727ab1d2d22ce8b486ed5c200a45b448e8afe8
File:  line 0
By blake41:

Ok a few things..and this all seems comically obvious now...

I read it wrong, and was running the sequence 4 million times. I needed to add a break if item > n and just run an infinite loop up till that point.

Also the sum doesn't get printed every time because it's not in the loop, the method only runs once, but that n.times block runs 4mil times which was why it took so fucking long. I also didn't need to shift the first number in the array off once i wasn't building up like a 4 million item array. lastly, my sum should have started at 2, not 0 because otherwise it's an even number NOT being counted. pushing up a new answer now