Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 1.28 KB

README.md

File metadata and controls

34 lines (24 loc) · 1.28 KB

Fibonacci Number Generator

🧐 I. Overview

This is a simple fibonacci number generator that takes an integer input from a user, then uses that input as the term of the fibonacci number to be generated. This program utilizes recursion and memoization (caching) to efficiently compute Fibonacci numbers.


📦 II. Dependencies

  • functools - this module is used for the lru_cache decorator applied to the recursive function f(n). This decorator caches computed Fibonacci numbers, improving efficiency by avoiding redundant computations. What it does is store recent function calls and reuse results for the same inputs.

⏯️ III. Demo

gif


🛠️ IV. How to use this repository?

Method 1: Clone repository

1. Create a copy of this repository:

git clone https://github.com/m3mentomor1/Fibonacci_Number_Generator.git

2. Go to the repository's main directory:

cd Fibonacci_Number_Generator

Method 2: Fork repository

Click the Fork button at the top right corner of this page to create a copy of this repository in your GitHub account.