← All problemsSign in

Finding Job

Chandler and Ross are best of friends. However, Chandler is faced with some unfortunate circumstances. He is out of a job! (Well sarcasm doesn’t really pay :p) Now after days of hard-work, he is tired of looking for a job. So, he decides to visit Ross’ for entertainment (life is an irony, I know). Just as he entered Ross’ home, he saw a tree with N nodes denoted by numbers from 1 to N. Node number

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