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.AlbertoBoth players wants to maximize histheir total score by the end of the game. Print out that number.If they both play optimally, whats the total score Alberto gets?↵
↵
Thank you!
↵
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.
↵
Thank you!