Google-Developer-Student-Club-CCOEW / Competitive-Programming-2023-GDSC-CUMMINS-X-GDSC-MMCOE

Welcome to the Hacktoberfest 2023 Competitive-Programming Cohort for Cummins College and MMCOE students! To request issue assignment, create a pull request, providing: 1. Full Name 🧑‍🎓 2.Email 📧 3.College ID (RNO) 🔢 4.Branch of Study.📚 5. Year 📆 .The Cummins College and MMCOE students' PRs will be considered only. Thank you!
9 stars 69 forks source link

Removal Game #151

Closed suryaprakashpandey closed 8 months ago

suryaprakashpandey commented 9 months ago

Write code in the preferred language and attach output with it.

There is a list of n numbers and two players who move alternately. On each move, a player removes either the first or last number from the list, and their score increases by that number. Both players try to maximize their scores.

What is the maximum possible score for the first player when both players play optimally?

Input The first input line contains an integer n: the size of the list.

The next line has n integers x1,x2,…,xn: the contents of the list.

Output Print the maximum possible score for the first player.

Example:

Input: 4 4 5 1 3 Output: 8

RishabhDhawad commented 8 months ago

Hey, Can I work on this issue?

aditi3004 commented 8 months ago

I'm enthusiastic about contributing to this issue. May I kindly request the assignment of this issue? -Aditi Sharma TY CSE,CCOEW

Pankaj4152 commented 8 months ago

Can you please assign this to me?