今日固定时间表
08:30 wake 只保留起床;学习从 08:50 开始。三块窗口不互相挤占。
| 08:30 wake | 起床、早餐、准备白板;不安排预读或算法。 |
|---|---|
| 08:50—09:15 | 08:50—10:55 system design Bad/Good/Great 拆解 — Bad: 每次保存全文;Good: op log + snapshot;Great: compacted snapshots + replay + transform/rebase + room fencing。 |
| 09:15—09:50 | 08:50—10:55 system design 精确原文 — 读 Google Docs potential deep dives、When Loaded/Updates H4、levels 和 references。 |
| 09:50—10:25 | 08:50—10:55 system design 故障时序 — room owner pause、op log replay、snapshot compaction、slow websocket client、presence expiry。 |
| 10:25—10:55 | 08:50—10:55 system design 恢复和指标 — 补 op-lag、snapshot age、transform conflict rate、reconnect recovery、storage bytes/doc。 |
| 14:30—16:15 | NeetCode Tag · Sliding Window 三道题在下方独立算法表执行。 |
| 20:30—21:15 | 20:30—21:15 Staff Q&A:op ordering、compaction、room owner lease、presence as soft state。 |
算法模块
连续单一 NeetCode Sliding Window tag;每天 3 个 NEW slot,每题 30 分钟作答 + 5 分钟证据,正好 105 分钟。每天 timed review = 0,满足不超过 1。
| # | Problem / mode | Pattern | Invariant | Bug risk | Time | Space |
|---|---|---|---|---|---|---|
| 10 | Find K-Length Substrings With No Repeated Characters NEW · 30m solve + 5m evidence | 固定长度唯一窗口 | 窗口长度不超过 k 且字符频次可判唯一。 | 重复字符跨左边界;不足 k 也计数。 | O(n) | O(alphabet) |
| 11 | Alternating Groups II NEW · 30m solve + 5m evidence | 环形固定长度窗口 | 连续交替 run 覆盖下标模 n,起点只计 n 个。 | 重复计算第二圈起点;k=1。 | O(n + k) | O(1) |
| 12 | Longest Substring Without Repeating Characters NEW · 30m solve + 5m evidence | 可变唯一窗口 | 窗口内字符全部唯一。 | lastSeen 小于 left 时错误回退 left。 | O(n) | O(alphabet) |
闭卷起手
15 分钟闭卷回答:document room owner 挂了、op 已持久化但广播失败、客户端 baseRevision 落后,分别怎么恢复?
Hello Interview 精确目录
day 页面使用 canonical data-toc-id/H4 anchors;周级 overview 不放小节链接。
| 项目 | 精确 canonical section | Disposition | 今天怎么用 |
|---|---|---|---|
| Google Docs | Potential Deep Dives | deep dive | scale and storage |
| Google Docs | 1) How do we scale to millions of websocket connections? | deep dive | connection fanout and document room ownership |
| Google Docs | 2) How do we keep storage under control? | deep dive | snapshots, compaction, op retention |
| Google Docs | Some additional deep dives you might consider | deep dive | extra prompts recorded for Staff pressure |
| Google Docs | When the Document is Loaded | deep dive | H4 load snapshot + missing ops |
| Google Docs | When Updates Happen | deep dive | H4 submit op + transform/broadcast |
| Google Docs | What is Expected at Each Level? | level expectation | calibrate interview depth |
| Google Docs | Mid-level | level expectation | basic collaboration flow |
| Google Docs | Senior | level expectation | OT/CRDT, scale, failure |
| Google Docs | Staff | level expectation | storage compaction, correctness and recovery |
| Google Docs | References | reference metadata | recorded but not scheduled as passive reading |
DDIA 精确决策卡
只读能改变今天设计决定的小节。
| 项目问题 | 精确 DDIA subsection | 改变的系统决定 |
|---|---|---|
| Google Docs 的 OT/CRDT 具体改变哪个系统决定? | Ch6 · CRDT 与操作变换 | operation log 存语义操作和 revision/context,而不是只存最终文本覆盖。 |
| 文档 room 内操作是否需要一个共享顺序? | Ch10 · 共享日志作为共识 | 服务端 sequencer/op log 给文档操作建立单调 revision;客户端基于 revision transform/rebase。 |
| 协同服务进程暂停会怎样破坏锁/租约? | Ch9 · 进程暂停 | 不要用本地进程假设持有无限租约;room ownership 需要心跳、lease expiry 和 fencing。 |
本日项目 artifacts
脚本、音频、PDF 与 mock evidence 直接从对应日打开。
今日产出、修复与英语 recall
| 课程角色 | CORE · all deep dives + Bad/Good/Great |
|---|---|
| 必须交付 | Google Docs deep-dive matrix:connection scale/storage/op replay/load/update/levels,各含 invariants、failure windows、metrics。 |
| 修复规则 | 如果 storage 只说“压缩”,补 snapshot interval、op retention、replay upper bound 和 audit trail。 |
| English recall | English recall: “A document room needs a recoverable operation log and bounded replay, not an infinite WebSocket buffer.” |
Detailed lecture notes, audio, recall scripts, PDFs, Staff Q&A, and mock packs are archived locally and are intentionally not published on this site.