Beyond Limits Interview Question

An Easier Dynamic Programming question