← All problemsSign in

Happy Suruchi

Suruchi's friend arrived to her state and called her up.She became very happy and wanted to meet her as soon as possible. But her friend arrived in city B while Suruchi lived in city A. Suruchi's state have N cities and any two city that are connected are bidirectional and have the same distance. She wants to reach her friend as soon as possible so she wants your help in finding out the smallest d

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