Skip to content

Determine nth Fibonacci number using memoization technique

Notifications You must be signed in to change notification settings

jgitao/cached_fibo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cached_fibo

Step 1:

Determine the nth Fibonacci number using both iterative and recursive techniques. Program is fibo.py This works fine with low numbers but is slow in calculating fibo numbers above 40. Slows to a crawl for those over 100.

Step 2:

Determine nth Fibonacci number using memoization technique

Program uses Memoization to determine even higher fibonacci numbers.

For higher fibo numbers, take adv of memoization instead of searching them directly Ex: Finding 1000th fibo number directly will cause recursion depth problem but searching for 300, 500, 750 then 1000 will give you needed result. When u search starting from lower, the lower fibo values are cached.

About

Determine nth Fibonacci number using memoization technique

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%