Citadel Interview Question

A question about dynamic programming.