Recursive to iterative dynamic programming in 3 steps!

preview_player
Показать описание
If you can do it recursively, you can do it iteratively. I'll show you 3 steps to convert any recursive dynamic programming solution into an iterative one: defining bounds, managing dependencies, and replacing recursive calls with values!

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

This is literally the best approach to a DP question in an interview

skabiraj
Автор

Man, I just started DP and this is just fucking golden !
I watched the previous one atleast 5-6 times before (zoomer attention span) actually understanding the depth it was promising, often taking a couple of days of break and revisiting via the induction method.
This is by far the most Feynman Tecniquish video on DP I have ever seen. Folks who are watching and this and scrolling comments sections. Its natural to not get it immediately. Your brain needs to marinate this concept for a bit, but once there it stays.
Don't get discouraged if you don't get it and even more important DONOT THINK OF MOVING AHEAD unless you can intuitively "GET IT".


I hope I can explain these concepts in ways that I understand taking inspiration from "THE DUDE"

esrevereverse-lv
Автор

As an IOI and ICPC world finalist and IOI coach, these two videos are the best videos on DP that I've seen so far

The way you explained DP on your previous video (make observations, think in terms of subproblems, write the recurrence relation, etc.) is pretty much how I explain DP to my students.

But I usually don't cover iterative dp optimizations as shown in this video out of fear of confusing my students, but I'll start trying from now on. (I hope you don't mind if I copy parts of your explanation)

smestre
Автор

I've already watched this video, specifically opened it to thank you. I used to so scared of DP problems. House Robber seemed very hard to me. Now, I literally solved it in 5 mins. No other tutorial or video has helped me this much regarding DP or recursion.

Airoxen
Автор

Please return this is the best series on programming problem solving I've seen 😢

gr.
Автор

babe wake up decodingintuition just posted a new video

bitterlychee
Автор

Hey, I'm still terrible at DP but its starting to make a bit more sense now. I think you generated a spark in my mind and it makes me appreciate these problems more. Thank you for making me enjoy DSA more!

NDPLACE
Автор

If you are doing competitive programming in c you can just use function macros instead of functions and still use recurrence relation without handling all the call stack logic. and just writing a recursive solution and let the proprocessor do its job for you.

ibrahim-tech
Автор

Really funny jokes + best explanations of DP back to back?? How does this channel exist, and how do you do it??

Airoxen
Автор

love the video, but that function naming scheme is criminal

n.-_
Автор

Best DP video in existence. This is taking me to a new level.

guambomber
Автор

never seen floyd mayweather implemented as recursive dp 😱
also the idea that you don't need to think about inner loop order when outer loop dependency is strictly one directional blew my mind 💪🏽
another video that will carry a generation 🔥🔥

greatfate
Автор

Yes! Haven't watched it yet but glad to see you again

Schindleria
Автор

I'm going to need to rewatch this in the future. There are a lot of techniques that I've never seen before!

simonwillover
Автор

I felt the goosebumps I feel when I solve math questions during school. Mannn its crazy and you sparked the new way to look at problems. I cant explain in words how much satisfied I feel right now. God bless all the fortune to you.

muzamil
Автор

i like that the examples force u to think, pretty proud of solving all of them correctly

yandere
Автор

I love both of your videos. You explain things extremely intuitively from a mathematical perspective that has changed my view on DP. I hope you post more soon!

jasminez
Автор

Thank you so much. As a beginner struggling with DP, I always find your videos helpful.

lbqg
Автор

best explanation of DP i've ever seen, love the idea of not relying on tables

ohmpatel
Автор

I never comment on videos but God bless you for making this brother

hayknazaryan
visit shbcf.ru