Bus Routes

You are given bus routes routes, where routes[i] is the list of stops visited cyclically by the i-th bus. A bus repeatedly travels through every stop on its route.

You start at stop source an...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: