← All problemsSign in

Metro Rail

A metro-rail network has multiple stations and the information regarding the train reaching the stops is given as a vector. For example, if A goes to stations B, C but not D is given as (0 1 1 0). A to A is taken as 0. The train may go from A to B, but it is not necessary that it goes from B to A. Given the information of the train's reachability to different stations, there are special station

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