← All problemsSign in

CARD GAME

Suraj and Chand decided to play a game on an eclipse day. So, they bought $N$ cards with a number written on them. Every card has a unique number written on it (No two cards have same number). Both take turns with Suraj taking he first turn. A player can either take the leftmost card or the rightmost card till there are no cards left. The player with maximum sum of numbers wins. Since both Sura

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start