← All problemsSign in

A New City

Swapnil loves to visit new cities all over the world. He loves travelling. Whenever he visits a new city, He travels every corner of the city, clicks many photos and writes a lot about it. He is a real Travelling Enthusiast. Now He is in a new city and decides to travel N places in the city on the first day itself. This all N places are connected by the roads. He is wondering if he can travel a

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