What Is Dynamic Programming and How To Use It
HTML-код
- Опубликовано: 12 дек 2017
- *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.
Sample code is available in Jupyter Notebook and plain Python at: www.csdojo.io/dpcode
Keep in touch on Facebook: / entercsdojo
Support me on Patreon: / csdojo
I missed putting a second argument (memo) at
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
Thank you CS dojo !!! I've passed a job interview because of this!!! You're the best!!!
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.
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.
your definition of dynamic programming is actually the definition of memoization
For free... dude, u are goat. People these days dont know how much technology, with a good use and being aware of his cons, can help.
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!
You don't even need an array in your "bottom up solution"
What is bottom up approach in programming?
Make some programming video on your pc
Smart, Humble and Simple. You're the best my man.
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 .
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.
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.
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.
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!
You only need 2 variables to store the last 2 fib values. The following code has
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!
I am following your data structures playlist and came across recursion where you mentioned dynamic programming and i came here.