Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1908. Game of Nim
Given several piles of stones and rules for how many stones can be removed each turn, determine whether the first player can force a win (or produce a winning move) under optimal play; model it as an impartial game and use nim-sum/Grundy numbers — a nonzero xor of pile Grundy values implies a winning position.
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.