Skip to content

Fibonacci with a memory

planning ahead

Level 1 of 3

Also called Memoisation and Top-down dynamic programming.

Each Fibonacci number is the two before it added up. Asking for one the plain way asks for the same smaller ones over and over; writing each answer down the first time it is worked out means every later ask is answered at once.

the memory

calls waiting

times asked
0
answered from the memory
0

step 1 of 1

Examples

A whole number from 0 to 9, for example 6.