Leetcode 815. Bus Routes
Given repeating bus routes and start/target stops, find the minimum number of bus rides required to go from source to target (or -1 if impossible). This is solved by modeling routes/stops as a graph (e.g., routes as nodes connected when they share stops) and performing BFS to find the shortest transfer path — note constraints: up to 500 routes and 1e5 total stop entries.
Asked at:
Amazon
Uber
Pinterest
PayPal
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Early August, 2026
Pinterest
Mid-level
Early May, 2026
Senior
Early April, 2026
Uber
Senior
Hello Interview Premium
Your account is free and you can post anonymously if you choose.