Search
⌘K
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:
Uber
Amazon
PayPal
Coupang
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Early May, 2026
Amazon
Senior
Early April, 2026
Uber
Senior
Early February, 2026
Uber
Mid-level
Hello Interview Premium
Your account is free and you can post anonymously if you choose.