NeetCode #724LC-877Medium2-D Dynamic ProgrammingNC 250
← Back to All Problems#724 · #877 · Stone Game(石子游戏)
📌 Problem Statement & Constraints
There is a row of
piles with an even number of piles. Alice and Bob alternately take a whole pile from either end, each maximising their own total. Return true if Alice wins; the total is odd, so there is always a winner. Constraints: 2 <= piles.length <= 500, piles.length is even, 1 <= piles[i] <= 500, and sum(piles) is odd.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!