Leetcode 1690. Stone Game VII
Two players alternately remove the leftmost or rightmost stone and score the sum of the remaining stones; compute the final score difference under optimal play. This is an interval DP / zero-sum game problem solvable by DP over subarrays (using prefix sums to get remaining-sum rewards) to maximize the current player's score difference.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.