Everything you need to prepare for the Amazon SDE online assessment
On this page
Quick answer
- Per Amazon, the SDE Online Assessment (OA) is the first step for full-time and internship SDE roles, and it evaluates coding skills, technical problem solving and Amazon's Leadership Principles.
- For full-time roles, Amazon lists: a coding assessment (average 70 minutes), a workstyles questionnaire (about 15 minutes), a work simulation (about 60 minutes) and a feedback survey (about 5 minutes). Set aside up to two hours. Depending on the country, the OA comes in one or two parts – your OA email says which.
- For SDE II, Amazon lists a 90-minute coding challenge (2 questions), about 15 minutes of system design and about 10 minutes of work styles, with 7 days to complete the OA.
- Amazon offers an unscored official practice test for the coding part, and says public online resources (like language documentation) are allowed during it.
- Use a laptop or desktop; Amazon does not recommend mobile devices or tablets for the OA.
SDE or SDE II: which page?
This page covers the Amazon SDE online assessment for full-time and internship SDE roles. Amazon lists a different structure for SDE II (coding, system design and work styles), so if you are applying for SDE II, read the Amazon SDE II online assessment page.
The coding assessment
What Amazon publishes (read November 25, 2026):
- Review and practice the language you plan to use, and take Amazon's own Online Assessment Practice Test – it is unscored and has no impact on your outcome.
- You may use publicly accessible online resources during the coding assessment (Amazon's examples: the Java Developer Kit, the Standard Template Library). Do not use sites that require a login or private repositories – browser usage is logged.
- Do not use print screen – Amazon says the session will be terminated – and avoid copy-pasting; the code should be yours.
- If you are stuck, move to the next problem and come back.
- After the OA you must complete the feedback survey; Amazon says skipping it delays your results. If you are moved forward, Amazon contacts you directly.
For the wider process, read our Amazon assessment guide.
What Amazon lists for each part
As Amazon’s SDE online assessment prep page states (checked November 25, 2026). Amazon says to check your OA email for your own structure, because depending on the country the OA comes in one or two parts.
| Part | Full-time SDE, per Amazon | SDE internship, per Amazon |
|---|---|---|
| Coding assessment | Average time 70 minutes | Average time 70 minutes |
| Workstyles assessment | Average time 15 minutes | Average time 15 minutes |
| Work simulation | Average time 60 minutes | Not listed |
| Feedback survey | Average time 5 minutes | Average time 5 minutes |
| Total | Amazon says to set aside up to two hours of uninterrupted time | Amazon says about 90 minutes |
Amazon says the OA evaluates coding skills, technical problem solving and its Leadership Principles, was designed in partnership with Amazonians, and needs no Amazon-specific knowledge. It says you receive an email after each section telling you whether you move to the next step. Amazon’s SDE II page lists different timings, so use the page for your own role and your invitation.
These are Amazon’s averages per part and its own planning time. For full-time roles the four averages add up to 150 minutes, which is more than “up to two hours”, so they do not add up to the same figure. That is a mismatch on Amazon’s own page. Check your invitation and plan for the longer one.
Practice: five original coding problems with worked answers
These problems are Prepti’s own. They are not taken from any real or reported Amazon assessment, and they use classic techniques (sorting with two pointers, sliding window, merging intervals, counting, breadth-first search) that most coding tests draw on. Work each one on paper or in your own editor first, with a timer of about 20 minutes, then open the answer. Python is used for the answers; use the language you will use in the OA. Nothing you type here is saved or sent.
Problem 1: Pairs that fit in a bin
A warehouse packs two parcels per bin. Given a list of parcel weights and a bin limit L, count the pairs of different parcels whose combined weight is at most L. Example: weights [4, 1, 7, 3, 5], L = 8 gives 6.
Show the worked answer
Idea: sort the weights, then use two pointers. If the smallest and largest fit together, then the smallest fits with every weight between them, so add all of those pairs at once.
def count_pairs(weights, limit):
w = sorted(weights)
i, j = 0, len(w) - 1
count = 0
while i < j:
if w[i] + w[j] <= limit:
count += j - i # w[i] pairs with every item from i+1 to j
i += 1
else:
j -= 1
return countWalk through the example: sorted is 1, 3, 4, 5, 7. (1,7) = 8 fits, so 1 pairs with all four others: add 4 and move i. (3,7) = 10 does not fit, so move j. (3,5) = 8 fits, so 3 pairs with 4 and 5: add 2 and move i. (4,5) = 9 does not fit, so move j and stop. Total 4 + 2 = 6: (1,3), (1,4), (1,5), (1,7), (3,4), (3,5).
Complexity: sorting is O(n log n) time. The two-pointer pass is O(n). Extra space is O(n) for the sorted copy. A brute-force double loop is O(n squared), which is the first idea to say aloud, then improve.
Edge cases: an empty list or one parcel returns 0. Duplicate weights are different parcels, so they count as separate pairs.
Problem 2: Longest calm stretch
You get a list of days, each 0 (on time) or 1 (late delivery). Return the length of the longest run of consecutive days with at most k late days. Example: [0,1,0,0,1,1,0,0,0,1] with k = 2 gives 7.
Show the worked answer
Idea: sliding window. Grow the right edge. If the window has more than k late days, shrink the left edge until it is valid again. Track the best length.
def longest_calm(days, k):
left = late = best = 0
for right, x in enumerate(days):
late += x
while late > k:
late -= days[left]
left += 1
best = max(best, right - left + 1)
return bestWalk through the example: the best window is days 3 to 9, counting days from 1: 0,0,1,1,0,0,0 has two late days and length 7.
Complexity: O(n) time, because each index enters and leaves the window once. O(1) space.
Edge cases: k = 0 gives the longest run of zeros. An empty list gives 0.
Problem 3: Merge delivery windows
Each driver has a delivery window [start, end]. Merge all windows that overlap or touch, and return the merged list sorted by start. Example: [[9,12],[1,3],[2,6],[11,14],[15,18]] gives [[1,6],[9,14],[15,18]].
Show the worked answer
Idea: sort by start. Walk through the list. If the next window starts at or before the end of the last merged window, extend that end. Otherwise start a new merged window.
def merge_windows(windows):
merged = []
for start, end in sorted(windows):
if merged and start <= merged[-1][1]:
merged[-1][1] = max(merged[-1][1], end)
else:
merged.append([start, end])
return mergedWalk through the example: sorted: [1,3], [2,6], [9,12], [11,14], [15,18]. [2,6] overlaps [1,3] so the end becomes 6. [9,12] starts after 6, so it opens a new window. [11,14] overlaps it so the end becomes 14. [15,18] starts after 14, so it stays separate.
Complexity: O(n log n) for the sort, then O(n). O(n) space for the output.
Edge cases: windows that only touch, like [1,3] and [3,5], merge here because we use start <= end. Say that assumption aloud. A window fully inside another needs the max() call. An empty list returns an empty list.
Problem 4: Top k order IDs
Given a list of order IDs (integers) and k, return the k IDs that appear most often. Break ties by the smaller ID first. Example: [7,3,7,9,3,7,9,9,4] with k = 2 gives [7, 9].
Show the worked answer
Idea: count with a dictionary, then sort by count descending and ID ascending.
from collections import Counter
def top_k(ids, k):
counts = Counter(ids)
ranked = sorted(counts.items(), key=lambda t: (-t[1], t[0]))
return [order_id for order_id, _ in ranked[:k]]Walk through the example: counts are 7 three times, 9 three times, 3 twice, 4 once. 7 and 9 tie at three, so the smaller ID comes first: [7, 9].
Complexity: counting is O(n). Sorting the m distinct IDs is O(m log m). If k is much smaller than m, a heap of size k gives O(m log k). Mention both and say when each wins.
Edge cases: k larger than the number of distinct IDs returns all of them. Ask what to return for an empty list.
Problem 5: Shortest route across a depot
A depot is a grid. “.” is open floor and “#” is a blocked cell. A robot starts at the top-left cell and must reach the bottom-right cell, moving one step up, down, left or right. Return the fewest steps, or -1 if it cannot get there. Example grid: [“..#.”, “#…”, “…#”, “#…”] gives 6.
Show the worked answer
Idea: breadth-first search. It visits cells in order of distance from the start, so the first time you reach the target is the shortest path.
from collections import deque
def shortest_route(grid):
rows, cols = len(grid), len(grid[0])
if grid[0][0] == '#' or grid[rows-1][cols-1] == '#':
return -1
dist = {(0, 0): 0}
queue = deque([(0, 0)])
while queue:
r, c = queue.popleft()
if (r, c) == (rows - 1, cols - 1):
return dist[(r, c)]
for dr, dc in ((1, 0), (-1, 0), (0, 1), (0, -1)):
nr, nc = r + dr, c + dc
if (0 <= nr < rows and 0 <= nc < cols
and grid[nr][nc] != '#' and (nr, nc) not in dist):
dist[(nr, nc)] = dist[(r, c)] + 1
queue.append((nr, nc))
return -1Walk through the example: the grid is 4 by 4, so the shortest possible route is 3 + 3 = 6 steps. A route of 6 steps exists around the blocked cells, and BFS finds it.
Complexity: O(rows x cols) time and space, since each cell is added once.
Edge cases: a blocked start or end returns -1. A 1 by 1 open grid returns 0. DFS finds a path but not necessarily the shortest one.
How to talk through a problem
- Restate the problem and ask about edge cases before you code.
- Say the simple slow solution first, with its complexity, then improve it.
- Write code you can explain line by line. Amazon says it expects the code to be your own, and to avoid copying and pasting in the assessment.
- Test your code on the example and on one edge case before you submit.
- If you are stuck, Amazon’s advice is to move on to the next problem and come back.
Prep plans for the coding part
These plans are our suggestion, not Amazon’s. Amazon says the OA needs no Amazon-specific knowledge, so the plans focus on core coding skills in the language you will use. Amazon also offers an unscored official practice test, described on its page as two practice questions. Take it early to see the format.
2-week plan
| Days | Do |
|---|---|
| 1 to 2 | Take Amazon’s official practice test. Set up your editor and review your language’s standard library (Amazon says public documentation is allowed during the coding part, but not sites that need a login). |
| 3 to 5 | Arrays and strings: sorting, two pointers, sliding window (Problems 1 and 2). Write each from scratch twice. |
| 6 to 8 | Hash maps, counting and intervals (Problems 3 and 4). |
| 9 to 10 | Graphs on grids with BFS (Problem 5). Practice reading the problem and listing edge cases first. |
| 11 to 12 | Two timed sessions of two problems each, about 70 minutes. Review every mistake. |
| 13 | Review notes. Check your laptop, webcam and internet against Amazon’s technical requirements. |
| 14 | Light review and rest. Re-read your invitation for the deadline. |
4-week plan
| Week | Do |
|---|---|
| 1 | Official practice test, then arrays, strings, sorting and two pointers. Learn the time and space cost of your language’s built-in structures. |
| 2 | Hash maps, sets, stacks and queues, sliding window, intervals. |
| 3 | Trees, graphs and BFS and DFS, plus simple recursion and dynamic programming ideas. |
| 4 | Timed mixed sessions of about 70 minutes, mistake review, setup check, and the work-simulation practice scenarios below. Rest the day before. |
Whatever plan you use, the work-simulation scenarios further down this page are the practice we offer for that part.
Practice: work simulation scenarios
Amazon's work simulation puts you in SDE day-to-day situations. These five original scenarios are Prepti's own, in that spirit: pick the most and least effective response, then read the reasoning. They are not real Amazon questions, and they avoid Amazon's proprietary content – the format and the engineering judgment are what transfer.
Nothing you pick is saved or sent. These five scenarios are original Prepti practice; they are not taken from any publisher's test.
FAQ
How long is the Amazon SDE online assessment?
For full-time roles Amazon lists an average of 70 minutes for coding, 15 for workstyles, 60 for the work simulation and 5 for the feedback survey, and says to set aside up to two hours. It says internship OAs take about 90 minutes. Check your OA email, because the structure depends on the country.
Can I look things up during the coding part?
Amazon says you may use publicly accessible resources such as language documentation. It says not to use sites that require a login or private repositories, and that your browser usage is logged.
Can I take the OA on a phone or tablet?
Amazon says to use a laptop or desktop and does not recommend mobile devices or tablets.
Are these real Amazon questions?
No. The coding problems on this page are original Prepti problems and unofficial. They are not taken from or paraphrased from any real or reported assessment.
Sources
Amazon.jobs: online assessment prep for SDE roles – OA sections and timings, practice test, allowed resources, device guidance; read November 25, 2026. Amazon.jobs: SDE II online assessment prep – 90-minute coding challenge, system design, 7-day window; read November 19, 2026.
Related: Amazon assessment, SJT formats explained.
By Prepti Team. Last checked: November 25, 2026 (SDE page); the SDE II page was last read November 19, 2026. Prepti’s coding problems, answers and plans are original, and the Python solutions were run against the examples shown. We are not affiliated with Amazon.