Is there a difference starting from the v / s front in dynamic programming environments?

For problems with dynamic programming, does it really matter if you start from the front or the back?

Right now, I don’t think, because even in optimization problems, where, say fun(n) = some penalty + fun(n-1), here it fun(n-1)does not depend on the value of c n. This means that we could very well calculate fun(n-1)from the start, and then add a penalty.

Could you give me an example.

+4
source share
2 answers

, " " - . , "memoization", , , " ". , " " memoization .

+2

All Articles