I have faced this problem in my unofficial national team selection test and i have been trying to solve it for days to no avail... Hope someone could help me :(
Given an integer array of length n (n <= 100000). Alberto and Brendaly play a game on it. On each turn the player picks a number from one of the 2 ends of the sequence. Alberto goes first. Alberto wants to maximize his total score by the end of the game. Print out that number.
Thank you!