News for hackers. Stuff that matters.
Re:Show HN: Twelve Simple Algorithms to Compute Fibonacci Nu... by Yessing on Sunday March 01, 2020 @06:20AM (#22456388)
another interesting fact:

if you have to compute the fib of very large numbers mod n. you can use the fact that the fibonnaci numbers would repeat.( see: https://en.wikipedia.org/wiki/Pisano_period)

<spoiler>

this allows you to solve problems like this: https://www.spoj.com/problems/FIBHARD/

<\spoiler>

Re:Show HN: Twelve Simple Algorithms to Compute Fibonacci Nu... by adas0693 on Monday March 02, 2020 @09:48PM (#22471367)
Thank you for the comment. Will check it out.
Re:Show HN: Twelve Simple Algorithms to Compute Fibonacci Nu... by hxhxhrra on Sunday March 01, 2020 @05:05AM (#22456175)
Algorithm fib1 („Dynamic Programming without Memoization“) is just ordinary recursion and not dynamic programming.
Re:Show HN: Twelve Simple Algorithms to Compute Fibonacci Nu... by adas0693 on Monday March 02, 2020 @09:48PM (#22471369)
Thank you for the comment. Pls refer to many references on the Web on the use of Fibonacci sequence as a dynamic programming example or illustration.