public int minimumTotal(List<List<Integer>> trgl) {
int sz = trgl.size();
int[] results = new int[sz+1];
for(int i=sz1; i>=0; i) {
List<Integer> tmp = trgl.get(i);
for(int j=0; j<tmp.size(); j++) {
results[j] = Math.min(results[j], results[j+1]) + tmp.get(j);
}
}
return results[0];
}
Java solution  dynamic programming


@pureblue That is an illegal input. every level of the triangle should only 1 number larger than its above level.