DSA Key Problems

Stone Game III

Two players alternately take the next one, two, or three stones from a row and add their values to their scores. Given the stone values and optimal play by both players, return whether Alice wins, Bob wins, or they tie.