Adobe Interview Question

A coding question on dynamic programming