Adobe Interview Question

One problem was a classical DP problem.