Karat Carpool on Linear Routes

Asked at Atlassian · Coding Questions · Difficulty: Medium · Last asked Jul 3, 2025

Given directed linear roads, two car starting locations, and people living at locations on the route to a campground, assign each person to the car that reaches them first. Ties can go to either car.

Loading the problem…