PREV INDEX NEXT

Author: Stan Eisenstat
Subject: Re: [Cs223] Dynamic programming in review problem 1
Date: Tuesday, 03 Mar 2020, 07:46:32


    > Message Posted By: Unknown
    >
    > I'm confused about how the dynamic programming algorithm in the solution
    > to review problem 1 works. What are k and i? What does the algorithm
    > actually return? Why is P1(1) set to x[0] and P2(1) set to x[1]?

K and I are indices.

The algorithm returns P1(N).

"P2(1) = X[1]" should be "P2(1) = X[0]".

--Stan-
PREV INDEX NEXT