@@ -0,0 +1,902 @@
+import java.util.ArrayList;%0Aimport java.util.Arrays;%0Aimport java.util.List;%0A%0A/**%0A * Created by liuxz on 17-3-9.%0A */%0Apublic class Leet120Triangle %7B%0A%0A    public int minimumTotal(List%3CList%3CInteger%3E%3E triangle) %7B%0A        int h = triangle.size();%0A        Integer%5B%5D l = new Integer%5Bh%5D;%0A        triangle.get(triangle.size()-1).toArray(l);%0A        for (int i = h-2;i %3E=0;i--)%7B%0A            for (int j =0 ; j %3C=i ; j ++)%7B%0A                l%5Bj%5D=Math.min(l%5Bj%5D,l%5Bj+1%5D)+triangle.get(i).get(j);%0A            %7D%0A        %7D%0A        return l%5B0%5D;%0A    %7D%0A%0A    public static void main(String%5B%5D args)%7B%0A        Leet120Triangle xx = new Leet120Triangle();%0A        List%3CList%3CInteger%3E%3E input = new ArrayList%3C%3E();%0A        input.add(Arrays.asList(1));%0A        input.add(Arrays.asList(3,4));%0A        input.add(Arrays.asList(6,5,7));%0A        input.add(Arrays.asList(4,1,8,3));%0A        System.out.println(xx.minimumTotal(input));%0A    %7D%0A%0A%7D%0A

complete 120