STOP Finding Fibonacci Numbers Like This!! | Matrix Exponentiation Implementation in Python

preview_player
Показать описание
Hey everyone, in this video I talk about how to calculate the nth Fibonacci number blazingly fast using Python and Matrix Exponentiation. Sorry for the lack of explanation but here are some resources:

#python #algorithms #programming
Рекомендации по теме
Комментарии
Автор

I'd say that the DP solution to the Fibonacci sequence is also pretty efficient. It can calculate Fibonacci numbers in O(1) per query and O(N) total. However, I would agree that the matrix exponentiation algorithm is probably better and cooler lol.

jessechoe
Автор

Wow, thank you so much i love the way you explain things, it's simple but still full and it helped me alot. 😁

lorisdst
Автор

it'd be so cool if you could person an eigendecomposition on that matrix, but unfortunately it's defective 😭

askii