Design pickup point planning for ride-hailing
AmazonSoftware Engineer · Technical ScreenLast updated
Design a ride-hailing pickup-point planning system. Covers map snapping, candidate generation, driver and passenger routing, safety filtering, scoring objectives, app presentation, architecture, historical learning, and A/B metrics.
Design an algorithm and high-level system for recommending a pickup point in a ride-hailing app.
A passenger requests a ride from an approximate city location, such as inside a building or near a large intersection. A driver is at a known GPS location. The system should recommend a safe and practical pickup point for the passenger to walk to and the driver to reach.
Constraints & Assumptions
- You have access to map data, road graphs, pedestrian paths, routing/ETA services, and real-time traffic when available.
- The passenger GPS pin may be noisy or inside a building.
- The driver must stop legally and safely.
- The pickup point should balance passenger walking time, driver ETA, safety, reliability, and user experience.
- Present the selected point clearly to both passenger and driver.
Clarifying Questions to Ask
- What city environment is in scope: downtown, suburb, airport, campus, or mixed?
- Is passenger walking ability or accessibility known?
- What is the maximum acceptable walking distance?
- Do we know legal stopping zones, curb access, entrances, and historical pickup success?
- Is the objective minimizing total time, cancellations, unsafe stops, or support contacts?
Follow-up questions
- How would you handle airports or malls?
- How would you learn better pickup points from historical data?
- How would you support passengers who cannot walk far?
- What metrics would you use to A/B test the pickup algorithm?
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.