jayadevvasudevan / basic-python

6 stars 27 forks source link

Add memoization solution for Fibonacci sequence #86

Open ShahbazShaddy opened 1 day ago

ShahbazShaddy commented 1 day ago

Hey @jayadevvasudevan!

I want to add a new solution to the Fibonacci sequence problem using memoization. The recursive approach, though elegant, suffers from redundant calculations, making it inefficient for large inputs. By adding memoization, this implementation avoids recalculating previously computed Fibonacci numbers, significantly improving the time complexity to 𝑂(𝑛) without altering the core logic of the recursive solution.

Kindly assign me this issue under Hacktoberfest 2024.

FullStack-webDevloper commented 23 hours ago

I will try my best to solve this problem