Week 10 · Day 5 · 2026-10-02 FRI · FULL · attempt + follow-up

Local Delivery full: availability, nearby DCs, inventory reservation

08:50-10:55 system design14:30-16:15 Intervals20:30-21:15 recall/mock

今日目标

Complete Local Delivery as the inventory analogue to Uber driver reservation: fast availability, strong checkout truth.

08:50-09:00Set target
One sentence: availability can be cached, physical inventory reservation cannot oversell.
09:00-10:05Attempt + Hello Interview reading
Read Local Delivery complete page through deep dives and levels.
10:05-10:45Decision note
Nearby DC search, drive-time filtering, cache/read replica path, ACID order reservation.
10:45-10:55Spoken close
Explain union availability vs checkout truth.
14:30-16:15NeetCode Tag · Intervals
Exactly three contiguous slots; each slot is 30m solve + 5m evidence.
20:30-21:15Recall / Mock
20:30-21:15 Local Delivery Chinese explainer/audio and English recall outline.

Live canonical source anchors

Daily anchors retain the original Hello Interview heading text.

ProjectExact canonical source headingDispositionUse
Local Delivery ServiceUnderstanding the Problemrequired readingmicro-DC inventory and rapid delivery
Local Delivery ServiceFunctional Requirementsrequired readingavailability by location and multi-item order
Local Delivery ServiceNon-Functional Requirementsrequired reading<100ms reads, strong ordering, 10k DCs, 100k items, 10M orders/day
Local Delivery ServiceSet Uprequired readingstrictly availability and ordering
Local Delivery ServicePlanning the Approachrequired readingentities/API/HLD before deep dives
Local Delivery ServiceDefining the Core Entitiesrequired readingInventory, Item, DistributionCenter, Order
Local Delivery ServiceDefining the APIrequired readingavailability and order APIs
Local Delivery ServiceHigh-Level Designrequired readingAvailability Service, Nearby Service, Inventory table, Orders Service
Local Delivery Service1) Customers should be able to query availability of itemsrequired readingnearby DC union availability
Local Delivery Service2) Customers should be able to order items.required readingatomic inventory/order transaction
Local Delivery ServicePutting it all Togetherrequired readinginitial full design
Local Delivery ServiceDeep Divesdeep divetraffic/drive-time and scaling reads
Local Delivery Service1) Make availability lookups incorporate traffic and drive timedeep divenearby candidate DCs then travel-time filter
Local Delivery Service2) Make availability lookups fast and scalabledeep divecache, read replicas, partitioning
Local Delivery ServiceWhat is Expected at Each Level?level expectationcalibrate full-coverage bar
Local Delivery ServiceMid-Levellevel expectationfunctional availability/order paths
Local Delivery ServiceSeniorlevel expectationoptimized availability and order consistency
Local Delivery ServiceStaff+level expectation2-3 deep insights with recovery and trade-offs

DDIA decision links

Week 10 decisionExact DDIA subsectionDesign consequence
Why is inventory order placement not allowed to be eventually correct?Ch10 - 线性一致性Checkout sees one serial order of inventory reservation; two orders cannot both own one physical unit.
What do queueing delays do to driver accept and order cancellation?Ch9 - 超时和无界延迟Timeouts are business states, not proof the client/server failed; late responses must be version-checked.

Algorithm block

SlotProblemPatternInvariantBug riskTimeSpace
13Minimum Number of Arrows to Burst Balloons
NEW · 30m solve + 5m evidence
greedy by endOne arrow at current end bursts all overlapping balloons.Inclusive endpoint overlap.O(n log n)O(1)
14The Number of the Smallest Unoccupied Chair
NEW · 30m solve + 5m evidence
event heapsFree chairs before seating arrivals at same time.Arrival/leave tie ordering.O(n log n)O(n)
15Check if Grid can be Cut into Sections
NEW · 30m solve + 5m evidence
project rectangles to intervalsTwo valid cuts require at least three merged non-overlap groups on one axis.Merging touching projections incorrectly.O(n log n)O(n)

Output and repair

DeliverableLocal Delivery 35m attempt/follow-up: DC service area, availability cache, inventory/order transaction, substitution/cancel state.
Repair ruleIf reads and checkout share the same stale count, split availability projection from transactional reservation.
ArtifactsLocal Delivery Chinese explainer Local Delivery Chinese audio Local Delivery English recall
English recallEnglish recall: defend freshness, reservation, race recovery, fairness, and observability without reading notes.
Local study materials
Detailed lecture notes, audio, recall scripts, PDFs, Staff Q&A, and mock packs are archived locally and are intentionally not published on this site.