Move the Coins 2
This is a sequel to the problem ["Move the Coins"](https://www.hackerrank.com/challenges/move-the-coins/problem) with a couple of twists! Alice and Bob are playing a board game. The board is a tree $T_{\textit{board}}$ with $N$ nodes (numbered $1$ through $N$). The game involves moving some coins around the board. For a node $R$ ($1 \le R \le N$), let's define a game $g(T_{\textit{board}}, R)$
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.
Sign in to chat with the tutor and save your progress.
Sign in to start