The code is based on dynamic programming. Let me know if you have any comments on improving it.

```
class Solution:
# @param triangle, a list of lists of integers
# @return an integer
def minimumTotal(self, triangle):
mintmp=[0]*len(triangle)
mintmp[0]=triangle[0][0] # initialized for the first layer
for i in range (1,len(triangle)):
mintmp[i]=mintmp[i-1]+triangle[i][i] # update the largest note
for j in range(i-1,0,-1): # reversely update all the notes
mintmp[j]=min(mintmp[j-1],mintmp[j])+triangle[i][j]
mintmp[0]=mintmp[0]+triangle[i][0] # update the lowest one
return min(mintmp)
```