Intuit Interview Question

Dynamic programming related coding question