Card Game: Maximum Score of the First Player
There are two players and a sequence of n cards (n is even, each card is a positive integer). Players alternate turns. On each turn a player takes the card at the left or right end of the sequence and...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
