面了 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