Solving Recurrences Example - Fibonacci (Recursion-Tree Method)

preview_player
Показать описание
In this video I solve for the runtime to calculate the nth fibonacci number using the recursion tree method. Note in this way of computing I did not use the memoization technique to improve the runtime.

-------------------------
Follow me on social media!

-------------------------

*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
Рекомендации по теме
Комментарии
Автор

50 minutes of Stack overflow post and only a half understanding (and conflicting answers) and 5 minutes of your video and it all makes sense. Thanks so much!

Gulzt
Автор

Thanks man, literally have my exam in 2hrs 🙏🏻🙏🏻

auraxlovi
Автор

Shoudn't the last level have 2^(n-1) nodes if we have n levels? There are 2^0 nodes in the first level, 2^1 nodes in the second level, so by following this order, the nth level should have 2^(n-1) nodes.

mangohar
Автор

If the levels are n, and leaf nodes are 2^n, should it be n*2^n?

soumitramehrotra
Автор

This course is very helpful. I will appreciate a lot if you make videos about data structure

thekeylanberg
Автор

could you please explain it also with an example? for example Big O of fib(5). I find that all paths in the tree doesnt reach the last level and hence the last level doesnt have 2^n nodes

shantomathew-fhhv