Predict the Winner
Medium
Game Theory
Two players take turns picking a number from either end of an array and adding it to their score, player 1 first. Print true if player 1 can win (a tie counts as a win for player 1) assuming both play optimally.
Constraints
1 <= n <= 20 0 <= nums[i] <= 10^7
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.