What Is Dynamic Programming and How To Use It

preview_player
Показать описание
**Dynamic Programming Tutorial**
This is a quick introduction to dynamic programming and how to use it. I'm going to use the Fibonacci sequence as the primary example.

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

I missed putting a second argument (memo) at 6:16 when calling fib(). Sorry.
Anyway, here’s an outline of this video:
0:00: Intro
0:38: What’s the Fibonacci sequence?
1:37: 3 steps for solving a problem with dynamic programming
2:21: Finding the n-th Fibonacci number with recursion
4:28: A memoized solution
6:37: A memoized solution - time complexity
9:24: A precursor to the bottom-up approach
10:45: A bottom-up approach
12:30: Demo with Python and Jupyter Notebook

CSDojo
Автор

Thank you CS dojo !!! I've passed a job interview because of this!!! You're the best!!!

pguti
Автор

Well explained! One suggestion for your bottom up approach is that you don't need to use an array with size n to hold all the numbers, you just need 2 variables to hold the previous two numbers, and keep updating them when iterating.

michaelw
Автор

Thank you! I'm a developer without a CS degree. Never really needed it but I'm trying to level up my skills and seeking out the things I've missed. Been doing it most of my life and I'm probably twice your age, never mind ego and pride, I'll learn where the learning is. Excellent video and explained very clearly.

doumkatekz
Автор

Awesome video. I'm a professional software developer who has been programming for a decade, and I still found this video helpful to put a name to something I've been doing without thinking.

Also, you have almost single-handedly erased my prejudice against Youtube videos as a medium for quickly conveying CS/programming concepts. You are concise, to the point, presentable, and easy to follow. You do not waffle or waste people's time with showboating. I will be recommending your channel from now on.

nemousama
Автор

You're great at explaining! I'm a final year comp sci student and have come across fib and dp countless times but this is the simplest and best example I've seen yet. Keep it up!

TinOfBeans
Автор

I must say, this is a very nicely done video, the example problem is simple enough to grasp the concepts for DP beginners like me, but also complex enough to demonstrate the usefulness of it and also impact of the different complexities. I have always had a hard time understanding recursive solutions (my brain just tends to get overwhelmed from it), but after this I actually feel I have a better understanding.

Thank you for making this!

vendels
Автор

Smart, Humble and Simple. You're the best my man.

vidyaranyatj
Автор

I am following your data structures playlist and came across recursion where you mentioned dynamic programming and i came here.

You are a great teacher with passion, that's what makes u separated from others. This is my opinion by seeing your videos. Sometimes some people teach some stuff which is also good but it might make you doubt yourself, here even though i have watched with just 50% focus (after a day long work) i could still understand.

Thanks soo much for teaching us all for free, i feel grateful that we have internet and best teacher teaching it all for FREE!!!

raghavendra
Автор

This is an excellent explanation. You chose a problem which is just complex enough to illustrate the technique. You methodically go through the steps and explain each step completely. I wish more tutorials were like this one. Well done!

davidranney
Автор

i am a 3rd year computer science student, although i have already done with data structures and algorithms courses . i have never really felt understood . this video helped me so much, hope you will continue doing these to help students like me, i am definitely going to share your works on my class group . please never stop adding more videos, i am looking forward to all your upcoming videos .
i love these so much, thanks a lot once again <3

anoops
Автор

This is by far the clearest explanation of dynamic programming I've seen! It's a topic I keep having to relearn every now and then but I think I finally truly understand it now.

Elena-tjso
Автор

I keep coming back here for a refresher every time I have an interview scheduled. Love this

dhawalmajithia
Автор

I migrated from aerospace engineering background to cs roughly two years ago. I can code, but doesn't know much about cs fundamentals. I learned quite a bit watching your videos. Keep up the good work!

domainxh
Автор

You are my hero, the difference between the recursive approach vs the bottom up approach is incredible. Thanks for making these ideas so easy to understand!

brieananichole
Автор

Struggling to understand DP...this was a fresh perspective, really helped, thanks.

The call-out to skip recursion and just fill in the table left to right is a game changer.

mereel
Автор

I've reviewed several DP resources, and none of them sit that well. Yours is the best and easiest to understand. I wish I started with your video. Would've saved so much time!

lynnguyen
Автор

I feel like an idiot. I never realized that Dynamic Programming wasn’t actually anything special. It’s just a few commonly used strategies for solving any given problem

DadBodSwagGod
Автор

This is THE best DP video on YouTube! The example you use is very simple but you really helped me understand what this approach is all about

nadamson
Автор

Man, the best explanation in Youtube, I've been trying to better understand a topic for about an hour.

dig
join shbcf.ru