C++ DP no extra space bottom up easy


#1
int Solution::minimumTotal(vector<vector<int> > &a) {
    for(int i=a.size()-2; i>=0; i--)
    {
        for(int j=0; j<a[i].size(); j++)
        {
            a[i][j] = min(a[i+1][j],a[i+1][j+1]) + a[i][j];
        }
    }
    return a[0][0];
}