Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1872. Stone Game VIII
Two players alternately remove a prefix of length >1, add its sum to their score, and replace it by a single stone until one remains; compute the final optimal (Alice−Bob) score difference. The problem reduces to a minimax/dynamic-programming on suffix sums to choose optimal split points efficiently for n up to 1e5.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.