Imagine you're Uber's architect. 20M rides/day. You need real-time driver matching, live location tracking, route calculation, and reliable messaging — all at global scale.
ASCII Architecture Diagram
[Rider App] [Driver App]
| |
v v
[API Gateway / Load Balancer]
|
+--------+----------+----------+
| | | |
[Location [Trip [Dispatch [Surge
Service] Service] Engine] Pricing]
| | | |
v v v v
[Redis [Postgres [Kafka [ML
Geo-index] RDS] Event Bus] Service]
|
[Notification
Service]
(WebSocket/
Push/SMS)
Think of Uber as a giant taxi dispatch center. Redis is the dispatcher's whiteboard showing all taxi locations. Kafka is the call recording system. The Dispatch Engine is the dispatcher — grabbing the nearest free driver and asking "want this ride?"
A dictionary where pages are sorted A-Z AND words within pages are sorted. You binary search the page number first, then binary search within the page. This matrix does both in one pass.
模版映射 / Map to Template
核心技巧:把 2D 坐标转换成 1D 索引
# m rows, n cols# 1D index i → 2D coords: row = i // n, col = i % n# Example: matrix[1][2] in a 4-col matrix → 1D index = 1*4 + 2 = 6
def searchMatrix(matrix: list[list[int]], target: int) -> bool:
m, n = len(matrix), len(matrix[0])
left, right = 0, m * n - 1# treat as 1D arraywhile left <= right:
mid = (left + right) // 2
mid_val = matrix[mid // n][mid % n] # convert 1D → 2Dif mid_val == target:
returnTrueelif mid_val < target:
left = mid + 1else:
right = mid - 1returnFalse
Imagine unrolling a 3×4 grid into a 12-slot tape. To find slot 9: 9 ÷ 4 = row 2, remainder 1 = col 1. With this magic formula, 2D becomes 1D, and you can binary search it directly!
🗣️ 软技能 / Soft Skills — Working with a Difficult Colleague
Day 33 · Mastery Phase · ~2 min read
为什么这个问题很重要 / Why This Matters
"难相处的同事"问题考察的不是谁对谁错,而是:
你能不能冷静处理人际冲突?
你有没有先从自己身上找原因的习惯?
你是否能推动问题解决而不是抱怨或绕开?
This question tests emotional intelligence, conflict resolution skills, and whether you're someone who escalates problems productively — not someone who complains or avoids.
"我们建立了 review checklist,PR cycle time 从 3 天降到 1 天"
❌ Bad vs ✅ Good
❌ 雷区回答:
"We had this toxic engineer who blocked everyone. I eventually went around him and delivered the project anyway."
问题:描绘同事为"toxic"、"around him"暗示你在规避而非解决、没有展示协作能力。
✅ 示范回答:
"There was a senior engineer who gave a lot of critical feedback in reviews but didn't always propose alternatives. At first I found it frustrating, but I realized his intent was high quality — just the delivery was off. I asked to pair on a review together to align on what 'good' looked like. We ended up creating a shared rubric the whole team adopted. He actually became one of my strongest allies after that."
Imagine a classmate who always says "that's wrong" on your drawing but never shows how to fix it. You could complain to the teacher, or — smarter — sit down together and ask "what does good look like to you?" Then make a shared standard. That's the essence of handling difficult colleagues.
🎨 前端 / Frontend — Deep Clone, Flatten, Curry — Utility Function Patterns
Day 33 · Mastery Phase · ~2 min read
真实场景 / Real Scenario
你在做一个表单状态管理器,需要:
深拷贝初始状态(避免突变)
展平嵌套配置对象
柯里化验证函数(复用参数)
You're building a form state manager — deep clone to avoid mutation, flatten nested configs, curry validators for reuse.
1. Deep Clone — 深拷贝
❌ 错误做法:浅拷贝
const copy = { ...original }; // nested objects still share reference!
const copy2 = Object.assign({}, original); // same problem
✅ 生产级实现:
function deepClone<T>(obj: T): T {
// Modern: use structuredClone (available in Node 17+, all modern browsers)
return structuredClone(obj);
}
// Manual fallback (interview version)
function deepCloneManual<T>(obj: T): T {
if (obj === null || typeof obj !== 'object') return obj;
if (obj instanceof Date) return new Date(obj.getTime()) as T;
if (Array.isArray(obj)) return obj.map(deepCloneManual) as T;
const clone = {} as T;
for (const key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
clone[key] = deepCloneManual(obj[key]);
}
}
return clone;
}
Deep clone = full photocopy, not just the cover. Flatten = turn nested folders into a dot-path list. Curry = pre-fill a form's first field and save it for later reuse.
Microsoft and OpenAI have reportedly revised their partnership to end exclusivity, allowing OpenAI to distribute models through AWS and Google Cloud — not just Azure.
Stripe 推出了 Link — AI Agent 数字钱包,让 AI agent 可以自主完成支付。Cloudflare 和 Stripe 还联手推出了一个协议,据报道可以让 AI agent 自主部署应用、创建账户、购买域名。
Stripe launched Link for AI agents — a digital wallet letting agents transact autonomously. Cloudflare + Stripe also launched a protocol reportedly enabling agents to deploy apps, create accounts, and purchase domains without human approval.
高盛 CEO David Solomon 表示:市场对"AI 将摧毁 SaaS"的担忧过度悲观。Figma、Atlassian 等公司数据显示,AI 正在被集成进产品,用户量并没有因 AI 替代而下降。
Goldman Sachs CEO David Solomon says the "Saaspocalypse" fear — that AI would wipe out SaaS — was reportedly overdone. Companies like Figma and Atlassian show continued growth, suggesting AI is being integrated into tools, not replacing them.
以前的 AI 就像一个超聪明的顾问——给建议,但不能自己动手。现在的 AI agent 不只是给建议,还能自己开账户、买东西、部署代码。就像从"有个天才朋友"升级到"有个天才朋友,而且他有你的信用卡"。
Before, AI was like a super-smart advisor — gives advice, can't act. Now AI agents can open accounts, make purchases, and deploy code. It's like upgrading from "brilliant advisor" to "brilliant advisor who also has your credit card."
Both Google Maps and Uber depend on efficient geo-indexing, but with different strategies: Maps uses Geohash+PostGIS for POI search; Uber uses Redis Geo for 1.25M writes/sec driver location updates.
2. 分层 vs 分区 / Hierarchical vs. Partitioned Routing
Google Maps 用等级路由(Contraction Hierarchies)——先高速公路,再主干道,最后本地街道,搜索空间缩小 1000x。Uber 的 Dispatch Engine 则是地理分片——按城市独立扩展,避免单点瓶颈。
Google Maps uses hierarchical routing (1000x smaller search space); Uber's dispatch shards by city to scale independently.
Both share the same pattern: Kafka for event decoupling, Redis for hot-path low-latency reads, DB for persistence. Never put high-frequency writes on a relational DB.
💻 算法模式总结 / Algorithms: Patterns Mastered
🔍 二分搜索模式正式开始(7题 Block,完成 2/7)
本周的核心主题是二分搜索模式,已完成前两题:
#704 Binary Search — 模版原型题
left, right = 0, len(arr) - 1while left <= right:
mid = (left + right) // 2if arr[mid] == target: return mid
elif arr[mid] < target: left = mid + 1else: right = mid - 1return -1
关键洞察: 每次排除一半搜索空间,任何具有单调性的问题都可以二分,不只是排序数组。
#74 Search a 2D Matrix — 坐标转换技巧
把 2D 矩阵"展平"为 1D 数组,用索引转换公式 row = mid // n, col = mid % n 无缝套用模版。
Time: O(log(m×n)) | Space: O(1)
模式信号 / When to reach for Binary Search:
排序数组 / sorted array
要求 O(log n)
"找满足条件的最小/最大值"
搜索空间可以单调地判断 True/False
Binary Search Pattern is open (7-problem block, 2/7 done). Core insight: the template never changes — only the direction logic changes.
🗣️ 软技能练习重点 / Soft Skills: What to Practice
本周覆盖两个 Staff 级场景:
1. 力排众议推动技术决策 / Championing an unpopular technical decision
不要靠权威压人,要靠数据 + POC 说话
把争论框架化为"可验证的假设"(pilot 90 天)而不是"我是对的"
被证明正确后,分享功劳——让最初反对的人成为拥护者
Staff 关键词:数据 + 谦逊 + 给对方台阶下
2. 与难相处的同事合作 / Working with a difficult colleague
先从自己找原因(沟通方式问题?)
私下直接对话,用"我感觉..."而不是"你总是..."
寻求共同目标,建立可复用的团队规范(checklist、RFC 流程)
Staff 加分:把个案冲突升华为系统性改变
需要练习 / What needs practice:
这两个场景都需要脱稿流畅叙述,重点背STAR 结构 + 量化结果
"I told you so" 是减分项,换成"我们一起达成了这个共识"
Both scenarios require smooth off-script delivery. Focus on STAR structure + quantified outcomes. Never say "I told you so" — reframe as "we reached consensus."
🎨 前端知识巩固 / Frontend: Concepts to Lock In
本周前端主题:性能优化 + 实用工具函数
Debounce vs Throttle(Day 32)
Debounce: 只关心最终状态——动作停止后 N ms 才执行(搜索框、resize)
Throttle: 需要持续中间状态——固定频率执行(scroll、防连击)
记住电梯 vs 水龙头的类比!
Deep Clone / Flatten / Curry(Day 33)
structuredClone() 是现代深拷贝首选(Node 17+,不支持函数)
展平公式:递归 + ${prefix}.${key} 路径拼接
柯里化本质:预填参数,返回等待更多参数的函数
快速自检 / Self-check:
[ ] 能手写 debounce?(clearTimeout + setTimeout)
[ ] 知道 {...obj} 是浅拷贝,嵌套对象仍是引用?
[ ] 能解释柯里化的应用场景(验证器复用、部分应用)?
🤖 AI 知识点 / AI: What Stuck
Day 32 — Function Calling(函数调用)
这是本周最"可落地"的 AI 知识:LLM 不执行代码,它只返回结构化 JSON 告诉你"请帮我运行这个函数"。你的代码拿到 JSON,执行真实的 API 调用,把结果再喂给模型,模型生成自然语言回答。
这就是所有 AI Agent 能"行动"的底层机制——从联网搜索到发邮件,全都是这个 5步流程。
Day 33 — AI News Roundup(AI 新闻) ⚠️ 以下内容据报道
据报道,微软与 OpenAI 终止云端独家合作,OpenAI 可进驻 AWS/GCP
据报道,Stripe + Cloudflare 为 AI agent 构建支付 + 部署基础设施(Agent-native Commerce)
据报道,高盛称"SaaS 末日"言过其实,AI 是增强工具而非替代者
本周核心 AI 洞察:AI 从"大脑"进化到"有钱包和合同的大脑"。Agent-native 基础设施(支付、身份、授权)是 2026 年最热的工程领域。
Function Calling is the core mechanism for all AI agents — LLM returns JSON, your code executes, result fed back to LLM. That's it. All AI agent "action" is this 5-step loop.
AI news items below are reportedly true (据报道):
Microsoft-OpenAI exclusivity reportedly ended; OpenAI can now use AWS/GCP
Day 32 和 Day 33 是第一批 Mastery 级内容——从"学概念"升级到"拿真实系统找差距"。连续 33 天不间断,覆盖了 29 道 NeetCode 题、28 个系统设计主题、28 个行为问题。
更重要的是:本周的 Google Maps 和 Uber 设计题难度已经接近 FAANG 现场面试水平。你不只是在学知识,你在模拟实战。
🎉 Officially in the Mastery phase!
Days 32-33 are the first Mastery-level sessions — moving from "learning concepts" to "finding gaps against real systems." 33 consecutive days. 29 LeetCode problems, 28 system design topics, 28 behavioral scenarios. Google Maps and Uber design are already FAANG interview-level. You're not just studying — you're simulating the real thing.
🎯 下周预告 / Next Week Preview
系统设计 (SysDesign: 28→30+):
接下来的系统设计题将围绕全球化分布式系统展开。预计涵盖:Design Ticketmaster / Hotel Booking、分布式锁、全球一致性挑战。
算法 (NeetCode: 29→34+):
Binary Search block 继续——Koko Eating Bananas (#875) 是分水岭,掌握"搜索答案空间"后,后续的 Hard 题难度会大幅降低。
预计进入 AI 安全与对齐(AI Safety & Alignment),或继续 Agent 架构专题。
Next week: Binary Search "answer-space" problems (key inflection point), global distributed systems design, and JS internals (closures, scope chain). Binary Search mastery at #875 Koko unlocks the remaining Hard problems.