Pinduoduo interview question

Previous projects. Dynamic programming algorithm questions.