Google Interview Question

Q. I was given a 1D array and the question was to be solved from DP(optimally]