What's dynamic programming? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

What's dynamic programming?

16th Nov 2019, 2:15 PM
Esraa Hamdino
Esraa Hamdino - avatar
4 Answers
+ 5
Dynamic Programming is a general algorithm design technique for solving problems defined by or formulated as recurrences with overlapping sub instances. Suppose you have a problem, so you will try to solve it as follows: 1- set up a recurrence relating a solution to a larger instance to solutions of some smaller instances. 2- solve smaller instances once. 3- record solutions in a table. 4- extract solution to the initial instance from that table.
24th Nov 2019, 9:08 PM
Moree
Moree - avatar
+ 3
Dynamic programming, in my opinion, is where, you code in such a way that your code works for you when you are not near it. I have done this with PHP. My website will greet you depending on the time of day. When you load the homepage or other parts of the website, the images randomly change/rotate. If it's a holiday season (Halloween ), my site changes images and theme. If a user's trial period has expired, my database kicks them out automatically. All of this happens if I'm asleep in bed. This means my website is working for me, with no live interaction. This is dynamic programming.
16th Nov 2019, 11:53 PM
Xyenia 🦉
Xyenia 🦉 - avatar
+ 3
Xyenia can u send a mugshot of your site ? Please
19th Nov 2019, 12:19 PM
Nwachukwu Chibuzor
Nwachukwu Chibuzor - avatar
+ 2
//It's kinda long things, you can see about dynamic programming here: https://www.geeksforgeeks.org/dynamic-programming/
16th Nov 2019, 5:00 PM
Sudarshan Rai
Sudarshan Rai - avatar