raywu/eulers — comment on commit f833b28885dc42ac33f399e23e010bc8a837a419
File:  line 0
By blake41:

my answer to #2 is still running...but it seems like we essentially did the same thing ( i edited the one that blew up to drop the first member of the array each time it adds the new fib number)

essentially i did the fib sequence using the array method
def fib(n)
vals = [0,1]
sum = 0
n.times do
a = vals[-1] + vals[-2]
vals << a
vals.shift
sum += a if a%2 == 0
end
puts sum
end
fib(4000000)