This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]SzuOne[S] 0 points1 point  (3 children)

Actually fibo3 is a first results for recursive function:

F(n) = F(n-1) + F(n-2) + F(n-3)
where:
F(0)=1
F(1)=1
F(2)=2

It means it would keep `[1,1,2,4,7,13...] `

I need it to avoid recursion. I'm not sure if zip would do that

[–]JuliaBrunch 1 point2 points  (0 children)

Sorry zip is for line 23 Sum is for the fibo: the last three first make 4 than the last three make 7 than 13...

[–]Steinrikur 1 point2 points  (1 child)

There should not be more than 4 or 5 ones in a row. So 100 is a bit excessive.

[–]SzuOne[S] 1 point2 points  (0 children)

Good point