Available question text
Two-player game: from the start of the remaining piles a player may take X piles with 1 ≤ X ≤ 2M (then M = max(M, X)), and players alternate until piles are gone; compute the maximum stones Alice can obtain assuming optimal play. This is solved with minimax/dynamic programming over state (startIndex, M) (n ≤ 100).
Related questions
Continue with questions that share topics or the same question type.
- Stone Game
Coding
- Stone Game III
Coding
- Stone Game IV
Coding
- Stone Game IX
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1140. Stone Game II
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source