Uber | Onsite |Bus-Route Variation (Uber)
Anonymous User
1745

Same as bus route https://leetcode.com/problems/bus-routes/
Additional condition to find path with minimum buses and stops. bus count has higher priority than stop count

[[1,2,7],[3,6,7], [6,7]]

Source 1 and Target 6
Possible path
1->2->7->3->6 Bust count 2 and stops 5
1-> 2-> 7->6 Bust count 2 and stops 4

So {2,4} is the answer

Comments (3)