Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1510. Stone Game IV
Two players alternately remove any positive perfect-square number of stones from a pile of n, and the player who cannot move loses; determine whether Alice (first player) has a forced win under optimal play. The core challenge is to evaluate winning/losing states up to n (n ≤ 10^5), typically by dynamic programming/minimax to see if any square move leads to an opponent losing state.
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.