Timeline for Python Solution for Project Euler #2 (Fibonacci Sums)
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 3, 2019 at 14:25 | review | Suggested edits | |||
Jun 3, 2019 at 14:49 | |||||
Dec 15, 2017 at 15:14 | comment | added | JDG | The problem with this answer is not that it's recursive; it's that every iteration, it recalculates the entire fibonacci sequence. A recursive solution that yields the even integers each iteration is about as fast as the generator solution submitted by @San4ez. I can't submit the code because I don't have enough rep, however for me the generator clocks at 13 s and the recursive at 16 s for 10^6 calculations. | |
May 15, 2016 at 3:58 | comment | added | djinn | It is massive compute since for every value of i we are recomputing fibonacci. Instead computing fibonacci(4000000) would be better in single go and computing sum | |
Sep 29, 2015 at 19:17 | review | Late answers | |||
Sep 29, 2015 at 19:25 | |||||
Aug 7, 2014 at 19:17 | comment | added | matheussilvapb | As @ckuhn203 said, this solution is too slow man, recursion is not a good way to handle this, compared to my solution I'm in the speed of light, haha just kidding... or not... | |
Aug 7, 2014 at 19:15 | review | Suggested edits | |||
Aug 7, 2014 at 19:18 | |||||
Aug 6, 2014 at 0:09 | comment | added | RubberDuck |
Very clean solution, but I will point out that the recursive solution becomes exponentially slower as n becomes large.
|
|
Aug 5, 2014 at 23:57 | review | First posts | |||
Aug 6, 2014 at 0:10 | |||||
Aug 5, 2014 at 23:54 | history | answered | gnostiscrounger | CC BY-SA 3.0 |