1/16
Loading...
🚇Nyang-Nyang Line!
What is the minimum number of corridor hops from start(0) to destination(4)?
Loading...
What is the minimum number of corridor hops from start(0) to destination(4)?
A mini metro network called the 'Nyang-Nyang Line' opened in Cat Village. Stations are connected by direct corridors, and you can move between two connected stations in one hop. All corridors have the same length (no weights). What is the minimum number of corridor hops to go from the start station to the destination? Taking one corridor counts as one move.
7 7 0 1 0 2 1 3 3 4 2 5 5 4 2 6 0 4
3
Reach the destination by taking 3 corridors: 0 → 1 → 3 → 4 or 0 → 2 → 5 → 4. Fewer is impossible!