American Express Interview Question

Dynamic programming coding challenge.