```
class Solution:
# @param triangle, a list of lists of integers
# @return an integer
def minimumTotal(self, triangle):
for i in reversed(range(len(triangle) - 1)):
for j in range(0, i + 1):
triangle[i][j] += min(triangle[i + 1][j], triangle[i + 1][j + 1])
return triangle[0][0]
```

It's a bottom-up dp, and direct modify the input array instead of using an extra array