Hiya Interview Question

A Dynamic Programming question