public static int recursive2(int indexIzq, int indexDer, int sum, int sumGreedy, int turn) {
		if (indexIzq > indexDer) {
		} else {
			if (turn == 0) {
				if (dp2[indexIzq][indexDer] != INF && indexDer != indexIzq) {
					return dp2[indexIzq][indexDer];
				} else {
					int b = recursive2(indexIzq, indexDer - 1, sum + nums[indexDer], sumGreedy, 1);
					int a = recursive2(indexIzq + 1, indexDer, sum + nums[indexIzq], sumGreedy, 1);
					return dp2[indexIzq][indexDer] = Math.max(a, b);
				}

			} else {
				if (dp2[indexDer][indexIzq] != INF && indexDer != indexIzq) {
					return dp2[indexDer][indexIzq];
				} else {
					int max = Math.max(nums[indexDer], nums[indexIzq]);

					if (max == nums[indexIzq]) {
						if (dp2[indexDer][indexIzq] != INF) {
							return dp2[indexDer][indexIzq];

						} else
							dp2[indexDer][indexIzq] = recursive2(indexIzq + 1, indexDer, sum, sumGreedy + nums[indexIzq], 0);
					} else {
						if (dp2[indexDer][indexIzq] != INF) {
							return dp2[indexDer][indexIzq];
						} else {
							dp2[indexDer][indexIzq] = recursive2(indexIzq, indexDer - 1, sum, sumGreedy + nums[indexDer], 0);
						}

					}
				}
			}
		}
		return sum - sumGreedy;
	}