Code RoomMap matching service
HardPrep Room Coding #3520

Map matching service

System designDistributed systemsSenior–Staff~50 min

Design a map-matching service that snaps noisy GPS traces to the road network. Input is a stream of raw GPS points (each with a lat/lng and accuracy radius, sampled every 1-5 seconds, sometimes drifting 20-50m off the true road, sometimes dropping out in tunnels). Output is the actual sequence of road segments the vehicle traveled. This feeds ETA, trip pricing, and driver-quality scoring, so accuracy matters. The service must handle 100k concurrent trips and produce matched segments in near real time. Describe the matching algorithm, how you handle ambiguity at junctions and parallel roads, and the latency vs accuracy trade-off of online vs offline matching.

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts (data model, bottlenecks, consistency, failure modes) and name the trade-offs you are making.

Clarify5:30 left
Estimate5:30 planned
Design16:30 planned
Deep dive13:30 planned
Failure9:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.