← All problemsSign in

Emergency

Joker is a busy man as you know and he just never stops. After recruiting his gang he wants to plan his attack for that he is having a map of city gotham marked with all the hospitals in the entire city with many roads connecting them. Gotham city can be seen as a Tree based structure with N hospitals denoted by unique Ids ranging from [1-N] that are situated in different parts of city and there

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