Search:

Type: Posts; User: helloworld922

Search: Search took 0.08 seconds.

  1. Re: find the sum of even number not exceed four million

    Ahh, that's a very interesting solution. There's not any significant performance boost (or ding), but it does look cool.
  2. Re: find the sum of even number not exceed four million

    Recursion definitely looks more elegant, but it is by no means more efficient. Fibonacci number computation is highly repetitive, so a dynamic programming solution (implemented iteratively) is the...
  3. Re: find the sum of even number not exceed four million

    You're condition is testing for until your computed result is greater than or equal to 4000000. So naturally the result you have will be the very first fibonacci number larger than 4 million.

    The...
Results 1 to 3 of 3