Amazon SWE Four-Round VO (Passed): Bracket Nesting Depth + Group Anagrams + Vending Machine OOD
Amazon SWE four-round VO that I passed: detailed behavioral follow-ups, maximum bracket nesting depth, grouping anagrams without sorting (count array as the key), a vending machine OOD with a Coin base class, and tips for behavioral answers that map to the Leadership Principles.
VO1: Behavioral + coding
The interviewer barely smiled and didn't say much. Right after my introduction we went into behavioral questions about deadlines and cross-team collaboration. The follow-ups were very detailed — a memorized STAR template isn't enough; you really need to know your stories inside out.
Coding: given a string with parentheses and square brackets, find the maximum nesting depth.
Approach: one pass — increment the depth on an opening bracket and update the maximum, decrement on a closing bracket, and return the maximum.
Follow-up: what if there's only one bracket type, or several mixed together? The same approach works.
def max_nesting_depth(s):
depth = best = 0
for c in s:
if c in "([":
depth += 1
best = max(best, depth)
elif c in ")]":
depth -= 1
return best
VO2: Behavioral + coding
Behavioral: mostly how I make decisions with incomplete information, and how I handle disagreements with peers or my manager.
Coding: group words that are anagrams of each other — without using the sorted-string signature.
Approach: use a 26-length count array as the hash key; a single pass groups everything. After writing it I ran a few tests, and we also discussed the pitfalls of using a product of primes as the key: overflow and collisions.
from collections import defaultdict
def group_anagrams(words):
groups = defaultdict(list)
for w in words:
count = [0] * 26
for ch in w:
count[ord(ch) - ord("a")] += 1
groups[tuple(count)].append(w)
return list(groups.values())
Time O(n · L), where L is the average word length.
VO3: OOD
A very friendly interviewer who smiled the whole time; the conversation was relaxed. After introductions she asked how I've helped teammates solve problems, about teamwork, and how I handle disagreements or conflicts with my manager.
OOD: design a vending machine. The key is abstracting a Coin base class, with each country's currency as a subclass that implements it. This round felt more like a design discussion than an exam.
VO4: Behavioral
- Why do you want to apply for this position at Amazon?
- How do you usually handle it when there's disagreement within your team?
- Can you share a project that best represents your skills and experience?
This round was clearly about team fit.
Behavioral prep tips:
- Tie your stories together with STAR, and back up the results with numbers — how much efficiency improved, how much cost you saved.
- Ideally each story maps to one or two Amazon Leadership Principles; that makes it much easier for the interviewer to sign off.
Found this helpful? Let's talk.
Happy to swap interview notes, do mock interviews, or share referral info.

Scan to add me on WeChat
More Amazon notes
View all ›Amazon New Grad Four-Round VO: What Changed This Year + Three Business-Scenario Coding Questions + Bar Raiser Deep DiveAmazon · 2026-10-04›
Amazon China SDE 27NG Four-Round VO: GenAI Behavioral + Topological Sort + Minimum Size Subarray + Binary SearchAmazon · 2026-10-02›
Amazon New Grad Interview Question: TaskScheduler, Fully Analyzed (Topological Sort)Amazon · 2026-10-02›
Amazon SWE 26NG Four Rounds: Dijkstra Delivery Routes + Sliding Window + Top K Orders + Bar RaiserAmazon · 2026-10-02›