public int minimumTotal(ArrayList<ArrayList<Integer>> triangle) {
		if(triangle == null || triangle.size() == 0) return 0;
		
		int[] res = new int[triangle.size()];
		for(int i = triangle.size() - 1; i > 0; i--) {
			ArrayList<Integer> list = triangle.get(i);
			for(int j = 0; j < i; j++) {
				res[j] = getMin(res[j] + list.get(j), res[j+1] + list.get(j+1));
			}
		}
		return triangle.get(0).get(0) + res[0];
	}