What's dynamic programming? | Sololearn: Learn to code for FREE!


What's dynamic programming?

11/16/2019 2:15:49 PM

Esraa Hamdy

4 Answers

New Answer


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.


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.


Xyenia can u send a mugshot of your site ? Please


//It's kinda long things, you can see about dynamic programming here: https://www.geeksforgeeks.org/dynamic-programming/