public int minimumTotalWithDP(List<List<Integer>> triangle) {

		if (triangle == null || triangle.size() == 0) {
			return 0;
		}

		Integer[] min = triangle.get(triangle.size() - 1).toArray(new Integer[triangle.size()]);

		for (int i = triangle.size() - 2; i >= 0; i--) {

			for (int j = 0; j < triangle.get(i).size(); j++) {

				min[j] = Math.min(min[j], min[j + 1]) + triangle.get(i).get(j);

			}

		}

		return min[0];
	}