Amazon intern Programs is a recruitment initiative by Amazon that offers internship and full-time opportunities for current students and recent graduates, aiming to attract young talent with innovation, strong problem-solving abilities, and leadership potential.
TimeLine
10/27- application submitted
11/26- oa
12/18- Follow-up Email
1/27 - Follow-up Email 2
2/4- recruiter reach out
2/5- vo invitation
2/18- interview back to back 60min*2
3-5- offer
Amazon SWE Intern OA
Q1:分发包裹
Topic:有 t 个测试场景。每个场景有 truckCapacities(数组长度 n)和 packageWeights(数组长度 m)。一辆车能运送包裹的条件:当前容量 >= 包裹重量,运送后容量 = floor(当前容量 / 2)。每辆车可以运送多次包裹(只要满足条件)。每辆车的初始容量固定。问:用这些车能否运送完所有包裹(包裹任意分配给车,每辆车按顺序运送包裹时容量会下降)。
Approach: For each scenario, load all truck capacities into a max-heap (simulated in Python via a min-heap with negated values) and sort packages by weight in descending order. Greedily assign the heaviest remaining package to the highest-capacity truck. If the largest available capacity still cannot carry the current package, immediately return failure. Otherwise, halve that truck's capacity (cap // 2) and push it back into the heap. Return 1 if all packages are successfully delivered, or 0 if not.
Coding
import heapq
def canAllPackagesBeDelivered(truckCapacities, packageWeights):
ans = []
for caps, pkgs in zip(truckCapacities, packageWeights):
h = [-c for c in caps]
heapq.heapify(h)
ok = True
for w in sorted(pkgs, reverse=True):
if not h:
ok = False
break
c = -heapq.heappop(h)
if c < w:
ok = False
break
heapq.heappush(h, -(c // 2))
ans.append(1 if ok else 0)
return ans
Q2:Usage 达到阈值的最早时间
Topic:给定多个用户的 活跃时间区间 [start, end],每个用户每秒贡献 1 usage,usage 是按时间累计的总和,求 累计 usage 第一次 ≥ max_usage 的时间点。
Approach: Define the total usage at time t as the sum of active seconds contributed by all users up to and including t — each interval [s, e] contributes max(0, min(t, e) - s + 1). Set r = max(end_time) as the upper time bound. If the cumulative usage at r still falls short of max_usage, it can never be reached, so return -1. Otherwise, binary search over [1, r] for the smallest time t where cumulative usage meets max_usage — at each step, compute the total usage up to the midpoint with a linear scan and adjust the left or right boundary accordingly.
Coding
def get_min_time(start_time, end_time, max_usage):
n = len(start_time)
if n == 0:
return -1
r = max(end_time) if end_time else 0
if r == 0:
return -1
total_at_r = 0
for s, e in zip(start_time, end_time):
if r >= s:
end_here = min(e, r)
add = end_here - s + 1
if add > 0:
total_at_r += add
if total_at_r < max_usage:
return -1
l = 1
while l < r:
mid = l + (r - l) // 2
cur = 0
for s, e in zip(start_time, end_time):
if mid >= s:
end_here = min(e, mid)
add = end_here - s + 1
if add > 0:
cur += add
if cur >= max_usage:
r = mid
else:
l = mid + 1
return l
Amazon SWE Intern VO
First round: BQ+Code
BQ:
1. Tell me about a time when you went above and beyond for a customer.
2. Describe a time when you had to take ownership of something outside of your direct responsibility.
3. Tell me about a time when you had to work with a large amount of data or details to solve a problem.
Coding: The question asks to merge K ordered chained tables .
Idea:First, a minimal heap can be used to help. Then throw all the head nodes of the linked table into the heap first. Next, pop the smallest node out of the heap one at a time, attach it to the result chain table, and then stuff the next node from that node back into the heap. Finally, when the heap is empty, all the linked tables are merged.
Second Round: BQ+Code
BQ:
1.Please describe a system module you have previously optimized. How did you identify the bottleneck, design a solution, and validate the results?
2.If you were to implement a real-time leaderboard under high-concurrency conditions, how would you design the data storage and update strategy?
3. How do you ensure that the code you write remains maintainable and testable through long-term iterations? Please explain with reference to a specific project.
Coding: Design a data structure that supports two operations: single-point update on an array and range sum queries.
Approach: Construct a binary tree from the array — leaves hold individual elements, and each internal node stores the sum of its children. Updates propagate from the target leaf up to the root, while range sum queries are resolved by combining a few complete subtree nodes. A Fenwick Tree (Binary Indexed Tree) is a cleaner alternative worth mentioning. Follow-ups: Is there a more concise alternative to a segment tree? How would you handle a dynamically sized array? This round was notably more focused on data structure internals and real-world engineering judgment. The interviewer expected not just working code, but a clear comparison of trade-offs across approaches — with well-organized code on a whiteboard or shared editor.
Write at the end
When preparing for Amazon's BQ, you must use the STAR model to organize your answers and try to show your impact in the "Result" section by how much efficiency was improved, how much cost was saved, and how many customer complaints were reduced. Each story should reflect 1-2 leadership principles, so that the interviewer will also recognize you.
Need help with your Amazon SWE Intern OA or VO interview? We've got you covered — reach out to us today.