Stone Game
Medium
Game Theory
Alice and Bob take turns picking either the first or the last pile from a row of piles; the total number of stones is odd and the number of piles is even. Each player maximises their own stones and Alice moves first. Print true if Alice wins.
Constraints
2 <= n <= 500 (n even) 1 <= piles[i] <= 500
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.