Problem 1140 · Medium

Stone Game II

Two players take piles from the front of a row, and the allowed take size grows after each move; find how many stones the first player can secure under best play. The visual shrinks the pile row and fills a table of best outcomes from the end backwards.

Open the interactive visualisation