重播旧消息
Question: Top K view event 可以 replay 吗,怎么不重复计算?
Kafka/Flink replay 用 offset/checkpoint;聚合更新必须按 eventId/window/videoId 幂等。
先盲做 Strava,再比较 YouTube/Top K 的可复用与失效假设:activity truth lives on device first, then syncs to backend.
| 08:50-09:00 | Set target 闭卷写 transfer hypothesis: 从 YouTube/Top K 能复用什么,什么会错? |
|---|---|
| 09:00-10:05 | Blind design then read 35 分钟 Strava blind design;之后读 current live headings through available deep dives. |
| 10:05-10:45 | Delta artifact 填写 delta, invalid assumptions, new bottleneck, follow-up that exposes shallow transfer. |
| 10:45-10:55 | Spoken close 英文解释 offline activity local log, replay, idempotent sync, and stale derived feed tolerance. |
| 14:30-16:15 | NeetCode Trees Exactly three contiguous Trees slots. Each slot is 30m solve + 5m pattern/invariant/bug/complexity evidence. |
| 20:30-21:15 | Recall / Q&A / repair 20:30-21:15 朗读 Strava transfer script and repair one invalid reused assumption. |
Use original Hello Interview titles and current canonical anchors. Inline Bad/Good/Great headings without standalone live anchors link to their parent canonical section.
| Original title / direct link | Disposition | Use |
|---|---|---|
| Understanding the Problem | blind-read-after-attempt | fitness activity tracking surface |
| Functional Requirements | blind-read-after-attempt | start/pause/stop/save, local stats, activity details |
| Non-Functional Requirements | blind-read-after-attempt | availability, offline use, accurate local stats, 10M concurrent activities |
| The Set Up | blind-read-after-attempt | scope and simplification |
| Defining the Core Entities | blind-read-after-attempt | User, Activity, Route, Friend |
| The API | blind-read-after-attempt | activity state, routes, list and detail APIs |
| High-Level Design | blind-read-after-attempt | client-server baseline |
| 1) Users should be able to start, pause, stop, and save their runs and rides. | blind-read-after-attempt | activity state log and pause semantics |
| 2) While running or cycling, users should be able to view activity data, including route, distance, and time. | blind-read-after-attempt | local route/distance computation |
| 3) Users should be able to view details about their own completed activities as well as the activities of their friends. | blind-read-after-attempt | completed activity list/detail views |
| Potential Deep Dives | transfer pressure | offline, scale, realtime sharing, leaderboard |
| 1) How can we support tracking activities while offline? | transfer pressure | client local buffer, periodic persistence, sync |
| 2) How can we scale to support 10 million concurrent activities? | transfer pressure | offload live writes to client, large route storage |
| 3) How can we support realtime sharing of activities with friends? | transfer pressure | polling/buffering instead of WebSocket by default |
| 4) How can we expose a leaderboard of top athletes? | transfer pressure | derived leaderboard state; current live page gates details behind premium |
Only exact Ch11/Ch12/Ch13 sections that change today's design are assigned.
Question: Top K view event 可以 replay 吗,怎么不重复计算?
Kafka/Flink replay 用 offset/checkpoint;聚合更新必须按 eventId/window/videoId 幂等。
Question: 批处理和流处理在 Week 7 怎么组合?
历史回填用 batch,近实时 view/activity 用 stream;读端统一看派生视图。
Question: 派生状态为什么允许短暂陈旧?
publication truth、view truth、activity truth 与 CDN/TopK/feed 派生视图分离。
Question: 缓存和物化视图 stale 到什么程度可接受?
CDN manifest、TopK cache、activity feed 都需要 TTL/freshness/SLO,而不是假装强一致。
Question: 如何把重复请求压成一次操作?
client request id、upload chunk fingerprint、activity sample id、view event id 都是重复抑制键。
Contiguous live NeetCode Trees order. No reviews. Three slots per day.
| # | Problem / mode | Pattern | Invariant | Bug risk | Time | Space |
|---|---|---|---|---|---|---|
| 13 | Path Sum NEW - 30m solve + 5m evidence | 根到叶路径累加 | 只有叶子节点才能判 remaining == value。 | 在非叶节点提前返回 true。 | O(n) | O(h) |
| 14 | Range Sum of BST NEW - 30m solve + 5m evidence | BST 剪枝 DFS | 低于 low 的左子树可跳过,高于 high 的右子树可跳过。 | 边界 inclusive 写成 exclusive。 | O(n) worst | O(h) |
| 15 | Leaf-Similar Trees NEW - 30m solve + 5m evidence | 叶序列 DFS | 只收集左右都空的节点值。 | 把单 child 节点当叶子。 | O(n+m) | O(n+m) |
| Output | Strava blind prompt, transfer artifact, script/audio, and follow-up response. |
|---|---|
| Hard fail | Passive reading without a spoken answer; missing invariant/failure/recovery/metric; any day outside Week 7 touched. |
| Repair | Pick the weakest answer and redo it for 8 minutes with one new failure window. |