Domanda di colloquio di Arcesium

Dynamic programming question. (Stock prices in a week)