-
Dynamic Programming
Hi, I'm new in the forum.
I've to give a test in the college and one of the topics is dynamic programming algorithms in c++. But i have no idea how to resolve this kind of problems even i read a lot about the subject. any recomendations of how to solve this problems??
thanks.
-
Store the calculated results in a vector or map or something. It's not harder than that.
Next time you're going to calculate the same thing, it's already saved somewhere, so fetch it and save the calculation.
Try fibonacci numbers, for example. They're a good exercise to apply this technique.
-
There are dozens of different things you could do, listed here