Optimising Fibonacci Number
Closed this issue · 4 comments
nilshah98 commented
Do the checklist before filing the issue:
- Do you have Node.js and all the relevant dev-dependencies installed?
- Is this a bug fix?
- Is this an enhancement?
- Is this a feature request?
NOTE: Provide a clear and concise description of the feature that needs to be added! Or if its a bug, then provide the necessary steps to reproduce it along with screenshots.
Current solution uses brute approach to find nth fibonacci number.
This issue requires one to convert the time complexity from O(n)
to O(logn)
by using Matrix Exponentiation to find nth fibonacci numbers.
Links-
Fibonacci Number Matrix Exponentiation GFG
Use either Method5 or Method6 from above link
Also, note that one needs to use Matrix Exponentiation library already created for Mathball under Mathball/src/matrixExponentiation
fave77 commented
@Ameenasuhani you're assigned!
fave77 commented
@Ameenasuhani your time's up!
Manvityagi commented
Can I take this ?
fave77 commented
@Manvityagi you're assigned