Solving a Question with Dynamic Programming | Hello Interview