今日固定时间表
三块窗口固定:08:50-10:55 系统设计,14:30-16:15 算法,20:30-21:15 口述。
| 08:50-09:25 | 08:50-10:55 system design 25-35 分钟 attempt - 闭卷设计 live prices、create/cancel/list orders;先区分 order、execution、portfolio projection。 |
|---|---|
| 09:25-10:05 | 08:50-10:55 system design 精确原文 - 读 Robinhood 全部 canonical headings,包括 background、HLD、3 个 deep dives 和 levels。 |
| 10:05-10:35 | 08:50-10:55 system design 故障时序 - submit 到 exchange 成功但本地写 externalOrderId 失败;cancel retry;trade feed duplicate/out-of-order。 |
| 10:35-10:55 | 08:50-10:55 system design DDIA 决策卡 - 用 Ch8 distributed transactions/exactly-once 和 Ch10 shared logs 定义恢复边界。 |
| 14:30-16:15 | NeetCode Tag · Binary Search 三道题,每题 30m solve + 5m evidence,不能改 tag。 |
| 20:30-21:15 | 20:30-21:15 Robinhood English recall outline + one duplicate order/cancel retry trace。 |
算法模块
连续 NeetCode Binary Search;每天 exactly 3 slots。
| # | Problem / mode | Pattern | Invariant | Bug risk | Time | Space |
|---|---|---|---|---|---|---|
| 1 | Single Element in a Sorted Array NEW · 30m solve + 5m evidence | pair parity | Before the single item, pairs start at even index; after it, parity flips. | Checking mid^1 outside range or wrong parity branch. | O(log n) | O(1) |
| 2 | Find Peak Element NEW · 30m solve + 5m evidence | slope binary search | If nums[mid] < nums[mid+1], a peak exists to the right. | Reading mid+1 when mid is hi. | O(log n) | O(1) |
| 3 | Successful Pairs of Spells and Potions NEW · 30m solve + 5m evidence | lower_bound per query | Sorted potions make required threshold index monotonic. | Multiplication overflow; ceil division error. | O((m+n) log n) | O(n) |
Hello Interview 精确目录
保留 live canonical heading title;day page 使用 direct section anchors。
| 项目 | 精确 canonical section | Disposition | 今天怎么用 |
|---|---|---|---|
| Robinhood | Understanding the Problem | required reading | brokerage system, not an exchange |
| Robinhood | Background: Financial Markets | required reading | symbol, market order, limit order, exchange interface |
| Robinhood | Functional Requirements | required reading | live prices and order management |
| Robinhood | Non-Functional Requirements | required reading | consistent orders, low latency, limited exchange connections |
| Robinhood | The Set Up | required reading | plan the interview path |
| Robinhood | Planning the Approach | required reading | build by functional requirements then NFR deep dives |
| Robinhood | Defining the Core Entities | required reading | User, Symbol, Order |
| Robinhood | The API | required reading | symbol price, create order, cancel order, list orders |
| Robinhood | High-Level Design | required reading | symbol service, order gateway, trade processor |
| Robinhood | 1) Users can see live prices of stocks | required reading | live market update path |
| Robinhood | 2) Users can manage orders for stocks | required reading | order create/cancel/read lifecycle |
| Robinhood | Potential Deep Dives | deep dive | price scale, order updates, order consistency |
| Robinhood | 1) How can the system scale up live price updates? | deep dive | symbol pub/sub, SSE fanout and subscription ownership |
| Robinhood | 2) How does the system track order updates? | deep dive | externalOrderId to internal order/user mapping |
| Robinhood | 3) How does the system manage order consistency? | deep dive | pending/submitted/filled/cancelled, cleanup and reconciliation |
| Robinhood | Some additional deep dives you might consider | deep dive | excess updates, order update push, historical portfolio data |
| Robinhood | What is Expected at Each Level? | level expectation | calibrate hard/full project depth |
| Robinhood | Mid-level | level expectation | functional price and order design |
| Robinhood | Senior | level expectation | real-time prices and consistent order workflow |
| Robinhood | Staff+ | level expectation | deep trade-offs with external exchange and failure recovery |
DDIA 精确决策卡
只使用 Ch8 和 Ch10 中直接解决今天设计决定的小节。
| 项目 | 项目问题 | 精确 DDIA subsection | 改变的系统决定 |
|---|---|---|---|
| Robinhood | What happens if order submission reaches the exchange but local persistence fails? | Ch8 - 分布式事务 | We avoid pretending local DB plus exchange API is one ACID database; we persist pending intent first and reconcile via clientOrderId. |
| Robinhood | How are repeated order/cancel messages processed safely? | Ch8 - 恰好一次消息处理 | Idempotency keys and externalOrderId mapping make duplicate dispatch, webhook, and cleanup retries converge to one order state. |
| Robinhood | How should ordered market updates be delivered to many clients? | Ch10 - 共享日志作为共识 | A symbol update stream carries sequence/as-of time; UI applies monotonic updates and can drop stale/out-of-order messages. |
三域 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 + 35m attempt/follow-up |
|---|---|
| 必须交付 | Robinhood 35m attempt + follow-up:price stream sequence、order state machine、externalOrderId map、cleanup/reconciliation。 |
| 修复规则 | 如果下单成功就直接更新持仓,重写 order -> execution -> portfolio projection 的状态链。 |
| English recall | English recall: An order is intent, an execution is fact, and portfolio is a derived view. |
Detailed lecture notes, audio, recall scripts, PDFs, Staff Q&A, and mock packs are archived locally and are intentionally not published on this site.