Find the Special Node
**This is an interactive task** There is a tree consisting of $N$ nodes. A certain node $X$ is marked as special, but you don't know $X$ - your task is to find it. To achieve this, you can ask queries to obtain information about $X$. To be specific, you can ask queries in the form: `? Y` where $1 \le Y \le N$, and you will be provided with a random node on the path from node $Y$ to node $X$,
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