public static int minimumTotal(List<List<Integer>> triangle) {
    	if (null == triangle) {
    		return 0;
    	} else if (1 == triangle.size()) {
    		return triangle.get(0).get(0);
    	}
    	int[] minlen = new int[triangle.size()];
    	for (int level = triangle.size() - 1; level >= 0; level--) {
    		for (int i = 0; i < triangle.get(level).size(); i++) {
    			if (level == triangle.size() - 1) {
    				minlen[i] = triangle.get(level).get(i);
    			} else {
    				minlen[i] = triangle.get(level).get(i) + min(minlen[i], minlen[i + 1]);
    			}
    		}
    	}
    	return minlen[0];
    }