← Questions
Predict the winner of a pick-from-either-end game
0
I was asked this
No reports yet. Sign in to say where you were asked it.
Two players take turns removing a number from either end of an array and adding it to their score; player 1 moves first and both play optimally. Return whether player 1 can win (a tie counts as a win). Solve it with interval dynamic programming on the score difference.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
