Day 55: 1 Dimensional Dynamic Programming