Week 10 · Day 1 · 2026-09-28 MON · CORE · requirements/API/data model/HLD
Uber HLD: fare, ride request, location update, candidate match
今日目标
Build the Uber happy path with driver location as a fresh projection and Ride/DriverOffer as durable state.
| 08:50-09:00 | Set target One sentence: match a rider to exactly one available nearby driver under stale GPS. |
|---|---|
| 09:00-10:05 | Blank-page attempt + Hello Interview reading Read Uber framing through HLD and four functional paths. |
| 10:05-10:45 | Decision note Bind driverId write key, geocell candidate index, fare estimate trust boundary, and ride status. |
| 10:45-10:55 | Spoken close Two-minute English HLD: fare -> request -> match -> offer -> accept. |
| 14:30-16:15 | NeetCode Tag · Intervals Exactly three contiguous slots; each slot is 30m solve + 5m evidence. |
| 20:30-21:15 | Recall / Mock 20:30-21:15 English recall: explain which state is durable and which state is projection. |
Live canonical source anchors
Daily anchors retain the original Hello Interview heading text.
| Project | Exact canonical source heading | Disposition | Use |
|---|---|---|---|
| Uber | Understanding the Problem | required reading | frame ride-sharing and on-demand matching |
| Uber | Functional Requirements | required reading | fare, ride request, nearby match, driver accept/decline |
| Uber | Non-Functional Requirements | required reading | low-latency match, strong matching consistency, peak throughput |
| Uber | The Set Up | required reading | candidate framing and below-the-line scope |
| Uber | Planning the Approach | required reading | requirements to entities to API to HLD |
| Uber | Defining the Core Entities | required reading | Rider, Driver, Fare, Ride, Location |
| Uber | API or System Interface | required reading | fare, ride, location update, accept/deny endpoints |
| Uber | High-Level Design | required reading | Ride Service, Location Service, Matching Service, Notification Service |
| Uber | 1) Riders should be able to input a start location and a destination and get an estimated fare | required reading | fare estimate path and trust boundary |
| Uber | 2) Riders should be able to request a ride based on the estimated fare | required reading | requested ride creation before matching |
| Uber | 3) Upon request, riders should be matched with a driver who is nearby and available | required reading | candidate retrieval and availability filter |
| Uber | 4) Drivers should be able to accept/decline a request and navigate to pickup/drop-off | required reading | offer, accept/deny, navigation state |
DDIA decision links
| Week 10 decision | Exact DDIA subsection | Design consequence |
|---|---|---|
| Uber driver location writes should be partitioned by what key? | Ch7 - 键值数据的分片 | Driver location is keyed by driverId for writes, but projected into geocell indexes for proximity search. |
| Why does geohash/S2 prefix help proximity search but risk hot zones? | Ch7 - 按键的范围分片 | Range-like geo prefixes support neighbor scans, but city centers must be split and load-shed by cell. |
Algorithm block
| Slot | Problem | Pattern | Invariant | Bug risk | Time | Space |
|---|---|---|---|---|---|---|
| 1 | Missing Ranges NEW · 30m solve + 5m evidence | boundary scan | Track the next expected integer between lower and upper. | Overflow at upper + 1; empty nums. | O(n) | O(1) |
| 2 | Remove Interval NEW · 30m solve + 5m evidence | interval subtraction | Each interval emits left/right residue outside the removed range. | Closed/open endpoint confusion. | O(n) | O(n) output |
| 3 | Add Bold Tag in String NEW · 30m solve + 5m evidence | merge marked spans | All matched spans are merged before rendering tags. | Adjacent spans should merge. | O(n * words) | O(n) |
Output and repair
| Deliverable | Uber HLD with Rider/Driver/Fare/Ride/Location/DriverOffer schema and API trust boundaries. |
|---|---|
| Repair rule | If location table is treated as assignment truth, rewrite the design so Ride/DriverOffer own assignment state. |
| Artifacts | Uber Chinese deep script Uber Chinese audio Uber English recall Uber recall PDF |
| English recall | English recall: defend freshness, reservation, race recovery, fairness, and observability without reading notes. |
Detailed lecture notes, audio, recall scripts, PDFs, Staff Q&A, and mock packs are archived locally and are intentionally not published on this site.