← All problemsSign in

Trumph and Maze

Problem description. Republic party candidate Donald Trump started his journey to campaign but got struck in a maze. The maze looks like a binary tree in structure with each junction having a number associated with it (1-10000). Given the junction where Trump is, help Trump to find the distance to the nearest exit. Input description. - First line consists of M, total no of inputs - Following M

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