dpVector[curindex] = dpVector[top] + dpVector[left]
dpVector[i][j] = dpVector[i][j-1]; // Append previous[left] one
dpVector[i][j] = dpVector[i-1][j]+dpVector[i][j-1]