Route Algo
CodeChefOpen on judge ↗
Indian Railways has assigned each city that it covers all over India with a unique three digit code. It has collected information about all the adjacent train route it operates, represented as a list of pairs of the form ("city1","city2"), where city1 is the 3-digit code of the starting city and city2 is the 3-digit code of the ending location city. IRCTC is building their website. Now, it wants
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.
Sign in to chat with the tutor and save your progress.
Sign in to start