Search
⌘K

Leetcode 877. Stone Game

Two-player zero-sum game on an even-length array where players alternately take an entire pile from either end; determine whether the first player can force a win under optimal play. This is typically solved with interval DP/minimax, though for the given constraints (even number of piles and odd total) Alice can always win.

Asked at:

Google

Google


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Late November, 2024

Google

Google

Junior

Dynamic programming question similar to coin game or house robber problem, with the goal to get the best sum

Comments

Your account is free and you can post anonymously if you choose.