IMC Trading interview question

Dynamic programming similar to the coin problem