File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change 33MATLAB Code: Solve Fibonacci Numbers using ** Dynamic Programming** , Memoization Implementation in MATLAB
44
55
6- 1- ** Fibo1.m: Fibonacci with Recursive approach:** \
7- * Time Complexity: O(2^n)
6+ 1 . ** Fibo1.m: Fibonacci with Recursive approach:**
7+ * Time Complexity: O(2^n)
88 * Space Complexity: O(2^n)
99
10- 2- ** Fibo2.m: Fibonacci with Dynamic programming (Memoization):** \
11- * Time Complexity: O(n)
10+ 2 . ** Fibo2.m: Fibonacci with Dynamic programming (Memoization):**
11+ * Time Complexity: O(n)
1212 * Space Complexity: O(n)
1313
14- 3- ** Fibo3.m: Fibonacci with Matrix Exponentiation:** \
15- * Time Complexity: O(log(n))
14+ 3 . ** Fibo3.m: Fibonacci with Matrix Exponentiation:**
15+ * Time Complexity: O(log(n))
1616
1717
1818
1919## How to use
2020
2121Just run the ** EVAL.m** file to compare run-time of the following three methods:
2222
23- 1- Fibo using _Recursive method_
24- 2- Fibo using _Dynamic programming_
25- 3- Fibo using _Matrix Exponentiation_ (Fastest method)
26-
23+ 1 . Fibo using ___ Recursive method___
24+ 2 . Fibo using ___ Dynamic programming___
25+ 3 . Fibo using ___ Matrix Exponentiation___ (Fastest method)
You can’t perform that action at this time.
0 commit comments