Recursion Tree Method

preview_player
Показать описание
Recursion tree method for solving recurrences running time example

An algorithm analysis example:
What is the running time of the following code ?

Easy Algorithm Analysis Tutorial:

►Please Subscribe !

►Videos:

►Visit my Website:

►Summation Formulas:

►RESOURCES:

Helpful Books:
Algorithm Analysis Books:

Discrete Mathematics Workbooks:

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

2 hours of lecture just in 15mins. Fantastic!!

charithbiyanwila
Автор

You are a beautiful human. My professor explained this in... not an ideal way, and I spent HOURS trying to understand it.I felt very confident as what to do by the 4:52 timestamp.

lucascolepichette
Автор

ayyy its a brotha doing cs lets go. I love when I see another one of us in cs go ahead man do that shit

julianyumanji
Автор

Suddenly Master Theory doesn't look that bad lol. Great video, really helped!

roxiogamer
Автор

I just needed to drop a comment, you are gold man! Thanks for the videos!

joeloyolabordagaray
Автор

the way it took me forever to understand this concept until i found this video :, ) thank you

sunnystarfish
Автор

Thank you very much this lecture is magic for me Nice explanation best short tutoriol

amirghorban
Автор

Thank you so much for the video! it helped me understand the concept a lot better. Also, you have a very easy to listen to voice :)

Alexgamer-pphm
Автор

Hello,
I know this video is very old, and I want to thank-you for teaching me the concept.

But, I have a question... Why are you using the summation formula instead of representing the summation as a series of (1/2^i)?

Because n^2 can be taken outside as it is a common occurrence throughout the series, then the series can be represented as a constant variable because the series was finite. After applying the Big-O notation rules the constant we had taken will be removed leaving us n^2 and O(n^2).

If we were to solve this series we end up with a function where when i = 0 we have f(i) = 1 and when i > 1 we have f(i) = 1 + (1 + 1/2)*1/2^(log(base 2 of n)-1), and the answer is O(n^2) after solving further.

celestynkinny
Автор

Thank you very very much! This is the best of the best lecture! You make hard concept so easy to understand! Thank you!

MW-fmqq
Автор

You are literally the best you tuber I have found who teaches these subjects! Keep making videos and helping us learn! Is there any chance you could make a video on guess and check substitution? Not just Iterative substitution?

johngilmore
Автор

I wish you could be my professor!!! You have done a much greater job than she does. My brain have never been so clear since this semester started...

daisy-fbjc
Автор

Hey!
In your solution you never used that T(1)=4 ...
After drawing the tree you took the sum from 0 to h.
I think it should be from 0 to h-1 and we also add 2^h * T(1) which is the cost of the last level.
Therefore the answer is 2n^2 + 2n.
Please tell me if you agree or disagree.

amphivalo
Автор

Great. Nice voice too, it's very relaxing.

louise
Автор

How did you remove the exponent log(n) from the summation?

kseniiaamelina
Автор

Could you explain how you get T(1) = 4 ? I thought it would be T(1) = 1. Also, do you split each node into 2 branches because of the 2T? If you had 3T would it be 3 branches from each node?

rayjennings
Автор

Thank you so much! Very helpful and understandable

mikado
Автор

Please break down the math simplification step by step

oscarmejia
Автор

Thanks for the video. It was very helpful.

NassosKranidiotis
Автор

Thanks a lot, this video was very helpful.

meechol