1D dp array, n^2 run-time