Two-dimensional Dynamic Programming
146 / 170Two-dimensional Dynamic ProgrammingLesson 11 of 11About 48 min
Two problems rebuilt cold, plus the question that identifies what the second index should be.
You may make at most k transactions, each a buy followed by a later sell, and want the maximum profit over a price series. What should the two dimensions be?
You have solved this one before. Rebuild it from scratch without looking at your old submission. If the approach does not come back within a few minutes, that is the signal that it needs another pass.
You have solved this one before. Rebuild it from scratch without looking at your old submission. If the approach does not come back within a few minutes, that is the signal that it needs another pass.