WEEK 05 · 2026-08-26 · WED

Online Auction:bid ledger、current highest bid 与强一致 HLD

拍卖不是排他 hold;它接受更高报价,事实是 append-only bid ledger 与确定性的 winner rule。

今日固定时间表

三块窗口固定:08:50-10:55 系统设计,14:30-16:15 算法,20:30-21:15 口述。

08:50-09:2008:50-10:55 system design
25-35 分钟 attempt - 闭卷设计 create auction、place bid、view auction;先声明 close rule 和 tie-break。
09:20-09:5008:50-10:55 system design
精确原文 - 读 Online Auction required anchors 到 HLD 三条用户路径。
09:50-10:2508:50-10:55 system design
白板主路径 - POST bid -> per-auction ordered append -> validate > highest -> accepted/rejected -> broadcast current highest。
10:25-10:5508:50-10:55 system design
DDIA 决策卡 - 用 lost update 解释 stale max-bid 失败,写出 duplicate bidId retry 的返回语义。
14:30-16:15NeetCode Tag · Binary Search
三道题,每题 30m solve + 5m evidence,不能改 tag。
20:30-21:1520:30-21:15 Online Auction English recall outline + 8 分钟 follow-up:同金额和截止前后 bid。

算法模块

连续 NeetCode Binary Search;每天 exactly 3 slots。

#Problem / modePatternInvariantBug riskTimeSpace
1Missing Number In Arithmetic Progression
NEW · 30m solve + 5m evidence
expected-value predicateBefore missing point, arr[i] equals arr[0] + i*d.Wrong diff sign or using endpoints when length is tiny.O(log n)O(1)
2Check If a Number Is Majority Element in a Sorted Array
NEW · 30m solve + 5m evidence
lower/upper bound countThe sorted range for target is contiguous.Inclusive/exclusive count mistakes when target absent.O(log n)O(1)
3Missing Element in Sorted Array
NEW · 30m solve + 5m evidence
missing-count predicatemissing(i) is monotonic by index.Confusing kth missing before array with inside-array count.O(log n)O(1)

Hello Interview 精确目录

保留 live canonical heading title;day page 使用 direct section anchors。

项目精确 canonical sectionDisposition今天怎么用
Online AuctionUnderstanding the Problemrequired readingauction item, bids, closing rule and winner
Online AuctionFunctional Requirementsrequired readingpost auction, bid, view auction and current highest bid
Online AuctionNon-Functional Requirementsrequired readingstrong consistency for bids, durability, real-time display, 10M auctions
Online AuctionThe Set Uprequired readingscope and framework entry
Online AuctionDefining the Core Entitiesrequired readingAuction, Item, Bid, User
Online AuctionAPI or System Interfacerequired readingcreate auction, place bid, view auction
Online AuctionHigh-Level Designrequired readingauction service, bidding service, current bid read path
Online Auction1) Users should be able to post an item for auction with a starting price and end date.required readingseller creates auction and item
Online Auction2) Users should be able to bid on an item. Where bids are accepted if they are higher than the current highest bid.required readingbid validation and accepted/rejected status
Online Auction3) Users should be able to view an auction, including the current highest bid.required readingview state and real-time highest bid

DDIA 精确决策卡

只使用 Ch8 和 Ch10 中直接解决今天设计决定的小节。

项目项目问题精确 DDIA subsection改变的系统决定
Online AuctionWhy can two stale bidders both appear accepted, and how is that prevented?Ch8 - 防止丢失更新Bid acceptance reads and updates current_highest_bid under one isolation boundary or conditional versioned update.

三域 trace 任务

Winning transaction标出唯一线性化点:seat hold/sold、accepted bid at close、brokerage order/execution state。
Duplicate/retry failure给出 stable idempotency key、重复返回语义、旧 owner/stale version 被拒绝的证据。
Projection boundary说明哪些读可以陈旧:seat map、highest bid display、market price UI;哪些写不能陈旧。

本日 artifacts

项目脚本、音频、PDF 和 mock evidence 从当天直接打开。

今日产出、修复与英语 recall

课程角色FULL · original reading + 30m attempt
必须交付Online Auction 30m attempt + HLD:Auction/Item/Bid/User、bid status、highest bid projection、winning bid trace。
修复规则如果只保存 maxBid 而丢 bid history,重写 append-only ledger 和 audit dispute path。
English recall
English recall: Bids are facts; current highest bid is a projection with a strict acceptance rule.
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.