面了 Amazon NG 岗位不少次,每次流程大致类似,但体验和考察重点一直在演进。这次分享的是刚完成的一轮 Amazon SDE NG,总共三轮:一轮纯 coding、一轮纯 behavioral、一轮混合(coding + behavioral)。整体感受是:题目不算特别偏难,但对表达能力、系统性思考,以及 Leadership Principles 的理解,要求越来越具体。
一、三轮概览
| 轮次 | 结构 | 主导 | 重点 |
|---|---|---|---|
| 第一轮 | 纯 coding(2 题,45 min) | SDE | Valid Palindrome II + Insert Interval |
| 第二轮 | 纯 BQ(3 题,40 min) | EM | Disagree / Ownership / Failure |
| 第三轮 | 2 BQ + 1 coding 混合 | engineer | Earn Trust / Invent & Simplify + 括号展开 |
二、第一轮:纯 Coding(2 题,45 分钟)
节奏紧凑,一上来直接进 livecode,没有寒暄(very Amazon-style efficiency)。
第一题:Valid Palindrome II(删一个字符成回文)
判断一个字符串是否可以通过 最多删除一个字符 变成回文。直接上双指针,配一个 helper 处理跳过逻辑。
def valid_palindrome(s: str) -> bool:
def is_pal(i, j):
while i < j:
if s[i] != s[j]:
return False
i += 1; j -= 1
return True
i, j = 0, len(s) - 1
while i < j:
if s[i] != s[j]:
# 第一次不匹配:要么删左、要么删右
return is_pal(i + 1, j) or is_pal(i, j - 1)
i += 1; j -= 1
return True
题不难,但面试官反问了两个 corner case:空字符串、单字符 是否符合题意。我提前写了 test case,正好覆盖到。
第二题:Insert Interval(区间插入合并)
输入是一组 non-overlapping、sorted 的区间,再给一个新区间,插入后 merge 成新的 interval list。线性遍历:先把所有在 new interval 之前的加入结果,再 merge 所有 overlap 的,最后把剩下的 append 上。
def insert(intervals, new):
res, i, n = [], 0, len(intervals)
# 1) new 之前、完全不重叠的
while i < n and intervals[i][1] < new[0]:
res.append(intervals[i]); i += 1
# 2) 所有与 new 重叠的,合并成一个
while i < n and intervals[i][0] <= new[1]:
new = [min(new[0], intervals[i][0]), max(new[1], intervals[i][1])]
i += 1
res.append(new)
# 3) new 之后、完全不重叠的
while i < n:
res.append(intervals[i]); i += 1
return res
coding 没卡壳,追问的重点在 time complexity(O(n)) 以及「为什么不用 binary search」——我解释:理论可用,但线性 scan 更直观,一次 pass 解决更稳健。
三、第二轮:Behavioral(3 题,40 分钟)
完全是 LP 导向的 BQ 轮,由一位 EM 主导,对项目经验和细节追问得很深。
- Disagree:「Tell me about a time you disagreed with a teammate or manager.」我讲了一个争取推迟上线窗口的例子(delayed launch due to missing dependency),陈述如何用数据支持建议,以及即使被 override 之后我 how I committed to the decision。面试官特别在意我有没有真正听取对方意见、有没有 collaborative behavior。
- Ownership:讲一次跳出来解决本不在职责范围内的问题。我讲了一个 incident:pipeline 出问题,很多人在推责任,我主动排查 log、修数据、补监控。他追问:「Did you ask for permission, or did you just take initiative?」我答:「I communicated the issue clearly, then proceeded to take ownership once everyone was informed.」
- Failure:负载预估错误导致系统崩溃的例子。这个问题几乎每轮都问,提前准备好复盘过程(retrospective + action items),讲清楚之后怎么避免同类问题。千万别避重就轻——Amazon 更看重你怎么面对问题,而不是能不能包装成不算失败。
四、第三轮:Mixed(2 BQ + 1 Coding)
前半 BQ,后半 coding。面试官是年轻 engineer,讲话快、逻辑清晰。
- Earn Trust:有没有遇到需要获取一个怀疑你技术判断的人的信任(when your technical plan was challenged)。我讲了主动引入类型系统的故事,起初被质疑 overengineering,后来用可维护性和上线效率证明方案有效。他问「What would you do if they still disagreed?」我答「I would ask what success looks like to them and try to align on the outcome instead of implementation.」
- Invent and Simplify:设计了什么系统 / 流程提升团队效率。我讲了一个自动化注册工具,把 API 文档和代码生成连起来。他重点问「How did you measure the effectiveness?」我给了手动流程耗时 vs 自动工具节省时间的对比数据。
Coding:括号展开 a2(bc)3(d) → abcbcddd
用栈做 stack-based parsing:遇到 ( 就 push context,遇到 ) 就 pop 并展开重复,注意 multi-digit 数字(如 10(ab))和空字符的 edge case。
def expand(s: str) -> str:
seg_stack, mul_stack = [], [] # 片段栈 + 倍数栈
cur, num = "", 0
for ch in s:
if ch.isdigit():
num = num * 10 + int(ch) # 处理 multi-digit
elif ch == '(':
seg_stack.append(cur); mul_stack.append(num)
cur, num = "", 0
elif ch == ')':
cur = seg_stack.pop() + cur * mul_stack.pop()
else:
cur += ch * num if num else ch # 形如 a2 表示 a 重复 2 次
num = 0
return cur
面试官对我 主动写 test case 印象不错,最后问了 time / space complexity 的 trade-off。
五、总结经验
面过多次 Amazon NG,题型变化不大,但对 细节深挖、思路完整性表达、LP 内化程度 要求越来越高。很多 candidate 以为 BQ 就是讲故事,其实 Amazon 真正在乎的是你能不能用 structured thinking(STAR + metric support)解释自己的选择、行为和判断——这比项目多牛更重要。Coding 相对标准化,大量出自 high-frequency LeetCode list,但写完一定要讲逻辑、改进点、复杂度和 test case,提前 cover edge case 是加分项。
FAQ
Q1:Amazon SDE NG 面试一共几轮?
这次是三轮:纯 coding(2 题)、纯 BQ(3 题)、coding + BQ 混合。不同组合略有差异,但 coding + BQ 的整体结构很稳定。
Q2:Amazon 的 coding 难吗?
不算偏难,大量出自 high-frequency LeetCode(Valid Palindrome II、Insert Interval、括号展开等)。难点不在写出来,而在写完后讲复杂度、edge case、test case 和改进点。
Q3:Amazon 的 BQ 怎么准备?
围绕 16 条 LP 准备结构化故事,用 STAR + 量化指标。Disagree / Ownership / Failure / Earn Trust / Invent and Simplify 是高频。Failure 题千万别避重就轻,重点讲复盘和 action items。
Q4:怎么高效准备 Amazon NG?
把高频 coding 题练到能边写边讲复杂度,BQ 按 LP 整理 8-10 个可复用故事。如果想要这几道真题的限时陪练、LP 故事打磨,或需要 VO辅助 / VO代面 的实时对接,可以发岗位 JD 先做题型预测再排练习计划。
正在准备 Amazon 面试?
Amazon NG 考的是高频 coding 的表达完整性 + LP 的结构化内化。oavoservice 提供 Amazon 全流程陪练:Valid Palindrome II / Insert Interval / 括号展开限时模拟、16 条 LP 故事打磨、混合轮节奏演练,也支持 VO辅助 / VO代面 的实时对接。教练含前 Amazon 资深工程师,熟悉「coding 写完追问 + BQ 深挖细节」的评分风格。
立即添加微信 Coding0201,获取 Amazon 真题与陪练。
联系方式
- 微信:Coding0201
- Email:[email protected]
- Telegram:@OAVOProxy