Leetcode 486. Predict the Winner
Given an array where two players alternately take a number from either end, determine whether the first player can guarantee a win (ties count as a win) assuming optimal play; this is solved by computing the best achievable score difference over subarray intervals (minimax/DP, n ≤ 20).
Asked at:

Amazon
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Mid October, 2024

Amazon
Mid-level
Alice and Bob are playing a game with a list of n integers. Players select integers, add to their score, and remove from the list. Alice goes first. Both play optimally. Find the minimum value of (A-B) where A is Alice's score and B is Bob's score. Bob can increase some integer values by at most k.
Your account is free and you can post anonymously if you choose.