面试场景
高频考察问题建模、边界条件与口头表达的清晰度。
常见误区
只背模板不解释为什么,容易在追问里失分。
练习策略
每轮练 3-5 题,固定复盘复杂度和可替代解法。
推荐练习顺序
Nim 游戏
In Nim Game, determine if you can win given a certain number of stones, assuming optimal play from both players.
猜数字大小 II
Minimize the maximum cost of guessing a number in a dynamic guessing game using optimal strategies.
我能赢吗
Determine if the first player can guarantee a win in a turn-based number selection game using state transition dynamic p…
预测赢家
Predict the Winner involves two players taking turns to maximize their score by picking from either end of an array, opt…
黑板异或游戏
The Chalkboard XOR Game is a game theory problem involving array manipulation and bitwise XOR, where players alternate e…
猜猜这个单词
Master the Guess the Word problem by applying array manipulation, match-counting math, and strategic interactive guessin…
石子游戏
Stone Game is a dynamic programming problem where players alternate taking stones from piles to maximize their score.
猫和老鼠
Determine the outcome of a two-player Cat and Mouse game on a graph using topological ordering and memoized dynamic prog…
除数博弈
Divisor Game is a game theory problem where players take turns subtracting divisors of a number n until one player loses…
石子游戏 II
Stone Game II is a dynamic programming problem where Alice and Bob alternate taking stones from piles to maximize their …
石子游戏 III
Stone Game III is a challenging dynamic programming problem based on game theory and state transition logic.
石子游戏 IV
Stone Game IV requires predicting the winner using state transition dynamic programming with careful consideration of pe…
你可以获得的最大硬币数目
Solve the Maximum Number of Coins You Can Get using greedy pile selection and invariant validation to maximize your coin…
石子游戏 V
In Stone Game V, Alice divides stones into rows to maximize her score, using a dynamic programming approach to try all d…
石子游戏 VI
Determine the winner in Stone Game VI using a greedy strategy that accounts for each stone's dual value impact on Alice …
石子游戏 VII
Maximize score difference in a two-player turn-based stone removal game using state transition dynamic programming.
猫和老鼠 II
Cat and Mouse II requires determining if the mouse can reach food before being caught using graph and topological orderi…
石子游戏 VIII
Stone Game VIII requires calculating maximum score difference using state transition dynamic programming on prefix sums …
求和游戏
Determine if Alice can force a win in the Sum Game by strategically replacing '?' using a greedy and invariant approach.
石子游戏 IX
In the Stone Game IX problem, Alice and Bob take turns removing stones, and Alice wins if the sum of removed stones is d…
如果相邻两个颜色均相同则删除当前颜色
Alice and Bob play a game removing colored pieces; Alice wins if she makes the last valid move.
求出硬币游戏的赢家
In this game between Alice and Bob, players must pick coins summing to 115. Alice starts, and the goal is to determine t…
字符串元音游戏
Solve the Vowels Game in a String using optimal moves and string analysis to predict the winner efficiently and accurate…
吃掉所有兵需要的最多移动次数
Calculate the maximum number of moves to eliminate all pawns using BFS, bitmasking, and precise array position math effi…