eBaySoftware Engineer · OnsiteCodemia practiceCheapest Shipping Route With Limited Carrier Handoffs
Given directed shipping legs (from_hub, to_hub, cost, carrier), a source and a destination, find the minimum total cost route that changes carriers at most K times between consecutive legs, or return -1 if none exists.