Skip to the content.

Amazon Interview Questions: SDE Coding and System Design Patterns (2027 Guide)

A free, practical guide to Amazon interview questions for software development engineers (SDE I, SDE II and above): the coding patterns that show up again and again in public Amazon interview experiences, linked LeetCode practice problems with approach notes, the system design topics to prepare, and how the Amazon online assessment, interview loop and Bar Raiser actually work. Use it as a study plan for an Amazon SDE interview, a new grad loop or an internship.

Independent community guide; not affiliated with or endorsed by Amazon.

Last reviewed: December 2026

What this is and is not. Nothing here is an official or leaked question. Amazon does not publish its question bank. The problems below are public LeetCode problems that practice the patterns most frequently reported in public interview write-ups (forums, blogs, candidate posts) and in Amazon’s own prep pages. The approach notes and the tested Python solutions in solutions/ are original work.

Table of Contents

How the Amazon SDE hiring process works

Amazon’s candidate site describes the experienced SDE process in four steps: application, online assessment, interview loop and outcome. Most SDE candidates see something like this:

Stage What happens Typical length What to prepare
Application Resume screen against basic qualifications days to weeks Quantified impact bullets that map to Leadership Principles
Online assessment Coding, system design scenarios (SDE II), work style survey about 2 hours, taken within 7 days of the invite Two medium-level problems in 90 minutes, without an IDE crutch
Recruiter or phone screen Sometimes a 45-60 minute technical screen instead of, or after, the OA 1 session One or two coding problems plus one or two LP questions
Interview loop Several 55-minute interviews, virtual or in person half a day, or spread over days Coding, design, and two or three behavioral questions in every round
Debrief and decision Interviewers and a Bar Raiser decide together Amazon says to expect an outcome within about 5 business days Nothing, but ask your recruiter for timelines

Official pages worth reading before anything else:

Some amazon.jobs pages now redirect to Amazon’s newer candidate site (atoz.amazon). Both links above resolve to the same content.

The online assessment (OA)

According to Amazon’s SDE II OA page, the assessment has three required parts plus an optional survey, runs on HackerRank, and must be finished within seven days of being sent. Only the coding part is timed.

Section Length (official, SDE II) What it checks How to prepare
Coding 90 minutes, 2 questions Data structures, algorithms, clean working code Timed medium problems; full runnable code, not pseudocode
System design about 15-20 minutes Scenario questions about design choices Know tradeoffs: caching, queues, SQL vs NoSQL, consistency
Work styles about 8-10 minutes Leadership style and ways of working, tied to the LPs Answer honestly and consistently; it is not a trick test
Feedback survey about 1 minute, optional Your experience Optional

Patterns commonly reported for the OA coding part:

New-grad and intern OAs have historically used different sections (for example work simulations). Amazon changes the format over time, so read the invite email carefully: it lists the exact sections you will get.

The interview loop

Amazon’s SDE II page describes the loop as four 55-minute interviews, each mixing technical questions with behavioral questions based on the Leadership Principles. Different interviewers cover different competencies. Commonly reported round types:

Round type What you do Signals they look for
Coding / problem solving One or two problems, sometimes with a follow-up that changes constraints Correct, readable, tested code; complexity analysis; edge cases
Logical and maintainable code A smaller problem where structure matters: classes, interfaces, extensibility Clean abstractions, naming, how you would extend it
System design (SDE II and up) High-level design of a service, at least one round Requirements, APIs, data model, scaling, failure handling, tradeoffs
Object-oriented / low-level design Model a parking lot, locker system, file search, etc. Classes, responsibilities, design patterns where they help
Bar Raiser Usually mixed technical and behavioral, more LP depth Long-term hiring bar across Amazon, not just this team
Hiring manager Often heavier on behavioral and team fit Ownership, delivery, what you would do in this team

Every round includes behavioral questions. Plan for 10-20 minutes of Leadership Principle questions in each interview, even in “coding” rounds. Amazon’s official tip is to use the STAR method and include metrics. See the companion guide amazon-leadership-principles-interview for a full LP story bank.

The Bar Raiser

Amazon has written publicly about its Bar Raiser program in All about Amazon Bar Raisers and Exploring Amazon’s unique interview process. The key points from those posts:

You usually are not told which interviewer is the Bar Raiser. Do not try to guess; treat every round as if it counts the most.

How coding answers are judged

Amazon’s SDE II prep page lists the main coding criteria as code that is scalable, robust and well tested, written in a real language (pseudocode is not accepted), with edge cases and bad input handled. In practice that means:

  1. Clarify the input size, types, empty input, duplicates, negative numbers and what to return when nothing matches.
  2. Say a brute force and its complexity in one sentence, then improve it.
  3. Write complete code with helper functions and clear names. Amazon interviewers often care about readability because a “logical and maintainable” round exists.
  4. Test out loud with a normal case, an edge case and a tricky case. Fix bugs yourself before the interviewer points at them.
  5. Discuss scale: what changes if the input does not fit in memory, or arrives as a stream?

Rules on AI tools

Business Insider reported in February 2025 that Amazon’s internal guidelines tell candidates not to use generative AI tools during interviews and that doing so can lead to disqualification (coverage by ITPro). Using AI to prepare is fine; using it during the OA or a live interview is not, unless a recruiter explicitly tells you a round allows it. Talking about how you use AI tools in your real work is fine and often useful.

Coding patterns and practice problems

Each table lists public LeetCode problems that practice one pattern. “Premium (paid)” problems need a LeetCode subscription; every pattern also has free problems. Problems marked with a solution have tested Python code in solutions/amazon.py.

1. Hash maps and counting

The single most common building block. Many OA questions reduce to “count things, then sort or pick the best”.

# Problem Level Access Approach notes
1 1. Two Sum Easy Free One pass: for each number, check whether target minus it is already in a dict of value to index. O(n). Solution included.
2 49. Group Anagrams Medium Free Key each word by its sorted letters (or a 26-count tuple). Group in a dict of lists.
3 692. Top K Frequent Words Medium Free Count with a dict, then a heap of size k ordered by (-count, word) so ties break alphabetically. Solution included.
4 819. Most Common Word Easy Free Normalize punctuation, lowercase, skip banned words, count. Watch the punctuation edge cases.
5 937. Reorder Data in Log Files Medium Free Custom sort key: letter logs by (content, identifier), digit logs keep original order (stable sort).
6 128. Longest Consecutive Sequence Medium Free Put all values in a set; only start counting from numbers whose predecessor is missing. O(n).
7 560. Subarray Sum Equals K Medium Free Prefix sums plus a dict of how many times each prefix appeared. Look up prefix minus k.
8 238. Product of Array Except Self Medium Free Prefix products left to right, suffix products right to left, no division.

2. Two pointers and sliding window

# Problem Level Access Approach notes
1 3. Longest Substring Without Repeating Characters Medium Free Window with a dict of last seen index; jump the left edge past a repeat. Solution included.
2 76. Minimum Window Substring Hard Free Expand right until all counts are covered, then shrink left while still valid; track a “missing” counter.
3 11. Container With Most Water Medium Free Pointers at both ends; always move the shorter wall, because the taller one cannot help.
4 42. Trapping Rain Water Hard Free Two pointers with left max and right max; the smaller side decides the water level. Solution included.
5 15. 3Sum Medium Free Sort, fix one number, two-pointer the rest, skip duplicates on all three positions.
6 904. Fruit Into Baskets Medium Free Longest window with at most two distinct values; same template as “at most K distinct”.
7 239. Sliding Window Maximum Hard Free Monotonic deque of indices, decreasing values; pop the front when it leaves the window.

3. Heaps and top-K

Amazon problems often mention “top”, “closest”, “cheapest” or “most frequent”: that is a heap hint.

# Problem Level Access Approach notes
1 973. K Closest Points to Origin Medium Free Max-heap of size k on squared distance (no square roots needed). O(n log k). Solution included.
2 215. Kth Largest Element in an Array Medium Free Min-heap of size k, or quickselect for average O(n).
3 23. Merge k Sorted Lists Hard Free Heap of (value, list index, node); pop smallest, push its next. O(N log k). Solution included.
4 295. Find Median from Data Stream Hard Free Max-heap for the lower half, min-heap for the upper half, rebalance so sizes differ by at most one.
5 767. Reorganize String Medium Free Always place the most frequent remaining letter that is not the previous one; impossible if any count exceeds (n+1)/2.
6 621. Task Scheduler Medium Free Count-based formula: (maxCount - 1) * (n + 1) + number of letters with maxCount, or the length if larger.
7 1167. Minimum Cost to Connect Sticks Medium Premium (paid) Greedy: always combine the two cheapest sticks with a min-heap (Huffman-style).

4. Graphs: BFS, DFS and grids

Grid problems (“islands”, “rotting”, “shortest path in a warehouse”) are among the most frequently reported Amazon patterns.

# Problem Level Access Approach notes
1 200. Number of Islands Medium Free Scan the grid; each unvisited land cell starts a DFS/BFS that sinks the island. Count starts. Solution included.
2 994. Rotting Oranges Medium Free Multi-source BFS from all rotten oranges at once; minutes = BFS levels. Return -1 if fresh remain. Solution included.
3 1091. Shortest Path in Binary Matrix Medium Free BFS over 8 directions; first time you reach the corner is the shortest path.
4 127. Word Ladder Hard Free BFS over words; generate neighbors with wildcard patterns like h*t to avoid O(n^2) comparisons. Solution included.
5 207. Course Schedule Medium Free Detect a cycle in a directed graph with Kahn’s algorithm (in-degree queue) or DFS colors.
6 210. Course Schedule II Medium Free Same as above, but return the topological order. Solution included.
7 417. Pacific Atlantic Water Flow Medium Free Reverse the flow: BFS uphill from each ocean’s border, intersect the two reachable sets.
8 1192. Critical Connections in a Network Hard Free Tarjan’s bridge algorithm: an edge is a bridge when low[child] > discovery[parent].
9 787. Cheapest Flights Within K Stops Medium Free Bellman-Ford limited to k+1 rounds, copying the distance array each round.
10 743. Network Delay Time Medium Free Dijkstra from the source; the answer is the largest shortest distance, or -1 if a node is unreachable.

5. Trees

# Problem Level Access Approach notes
1 236. Lowest Common Ancestor of a Binary Tree Medium Free Recurse: if both sides return a node, the current node is the LCA; otherwise pass up the non-null side.
2 103. Binary Tree Zigzag Level Order Traversal Medium Free Level-order BFS; reverse every other level (or append to a deque from alternating ends).
3 543. Diameter of Binary Tree Easy Free Post-order: height of each node, update a global best with left + right height.
4 297. Serialize and Deserialize Binary Tree Hard Free Pre-order with null markers; rebuild with an iterator. Solution included.
5 124. Binary Tree Maximum Path Sum Hard Free Each node returns its best single-branch gain (never below 0); update the answer with node + both gains.
6 98. Validate Binary Search Tree Medium Free Pass (low, high) bounds down the recursion, or check the in-order sequence is strictly increasing.
7 863. All Nodes Distance K in Binary Tree Medium Free Add parent pointers (or build an undirected graph), then BFS k steps from the target.

6. Design-a-data-structure problems

Amazon interviewers often blend coding and design: “implement a cache”, “implement a key-value store with timestamps”.

# Problem Level Access Approach notes
1 146. LRU Cache Medium Free Hash map from key to node in a doubly linked list; move to front on access, evict from the tail. O(1) per op. Solution included.
2 380. Insert Delete GetRandom O(1) Medium Free Array of values plus a dict of value to index; delete by swapping with the last element.
3 981. Time Based Key-Value Store Medium Free Dict of key to a list of (timestamp, value) appended in order; binary search for the latest timestamp at or before t. Solution included.
4 1146. Snapshot Array Medium Free Per index, keep a list of (snap_id, value); binary search on get.
5 362. Design Hit Counter Medium Premium (paid) Queue of timestamps, or 300 buckets keyed by timestamp mod 300.
6 588. Design In-Memory File System Hard Premium (paid) Trie of path parts; each node is a directory or a file with content.
7 1268. Search Suggestions System Medium Free Sort products, then binary search for each prefix and take up to three matches; or a trie storing top three per node.
8 460. LFU Cache Hard Free Key to (value, freq), freq to an ordered dict of keys, and a running min frequency.

7. Intervals, sorting and greedy

# Problem Level Access Approach notes
1 56. Merge Intervals Medium Free Sort by start; extend the last merged interval while starts overlap. Solution included.
2 253. Meeting Rooms II Medium Premium (paid) Sort by start; min-heap of end times; the heap size is the number of rooms needed.
3 763. Partition Labels Medium Free Record each letter’s last index; cut when the current index equals the furthest last index seen.
4 134. Gas Station Medium Free If total gas is less than total cost, impossible; otherwise restart from i+1 whenever the running tank goes negative.
5 435. Non-overlapping Intervals Medium Free Sort by end, greedily keep intervals that start after the last kept end.
6 1094. Car Pooling Medium Free Difference array (or sweep line) over pickup and drop-off points.

8. Stacks and parsing

# Problem Level Access Approach notes
1 20. Valid Parentheses Easy Free Stack of expected closers. Solution included.
2 739. Daily Temperatures Medium Free Monotonic decreasing stack of indices; pop while the current temperature is warmer.
3 735. Asteroid Collision Medium Free Stack; only a right-moving top and a left-moving newcomer can collide.
4 394. Decode String Medium Free Stack of (previous string, repeat count) pushed at each “[”.
5 227. Basic Calculator II Medium Free Track the last operator; push numbers for + and -, combine immediately for * and /.

9. Dynamic programming and backtracking

Amazon reports include DP less often than graphs and heaps, but word-break and coin-change style problems do appear.

# Problem Level Access Approach notes
1 139. Word Break Medium Free dp[i] is true if some dp[j] is true and s[j:i] is a dictionary word. Solution included.
2 322. Coin Change Medium Free Unbounded knapsack: dp[a] = min(dp[a - coin] + 1). Solution included.
3 5. Longest Palindromic Substring Medium Free Expand around each of the 2n-1 centers. O(n^2) time, O(1) space.
4 79. Word Search Medium Free DFS with in-place marking; restore the cell on backtrack.
5 212. Word Search II Hard Free Build a trie of words, DFS the board once, prune trie branches as words are found.
6 273. Integer to English Words Hard Free Process groups of three digits with “Thousand”, “Million”, “Billion” suffixes; careful with zero and spaces.
7 55. Jump Game Medium Free Track the furthest reachable index; fail if you stand beyond it.

Object-oriented / low-level design

Public Amazon interview reports often mention an object-oriented design question, especially for SDE I and SDE II. These are not on LeetCode; practice them on a whiteboard or in a plain editor. Commonly reported prompts:

Prompt Core classes What interviewers probe
Parking lot ParkingLot, Level, Spot (by size), Vehicle, Ticket Assigning spots by size, pricing as a strategy, concurrency at entry gates
Amazon Locker style pickup Locker, LockerSize, Package, PickupCode, LockerService Size matching, code expiry, what happens when no locker fits
Unix find style file search File, Directory, Filter interface, AndFilter, OrFilter Composable filters (size, extension, name); adding new filter types without editing old code
Elevator system Elevator, Request, Scheduler, Direction Scheduling strategy, state transitions
Deck of cards / card game Card, Deck, Hand, Game Reuse across different games
Library or inventory system Item, Member, Loan, Catalog Search, holds, overdue rules

A good 45-minute answer: clarify use cases (5 min), list classes and relationships (10 min), write the key classes and one or two core methods (20 min), then discuss extensions (10 min). Name the design patterns only where they help (strategy for pricing, composite for filters, observer for notifications).

System design topics

Amazon’s SDE II page says to expect at least one system design question and lists practicality, accuracy, efficiency, reliability, optimization and scalability as objectives. Commonly reported prompts:

Prompt Key ideas to cover
URL shortener ID generation (counter + base62 vs hashing), read-heavy caching, redirects, analytics
Product page or catalog service Read replicas, cache-aside, search index, eventual consistency for reviews
Order and checkout pipeline Idempotent APIs, payments as a separate service, queues, sagas instead of distributed transactions
Top-K best sellers or trending items Stream processing, count-min sketch vs exact counts, time windows
Notification service Fan-out, per-channel workers, retries with backoff, user preferences, dedup
Rate limiter Token bucket vs sliding window, where to enforce (gateway), shared state in a cache
Distributed cache / key-value store Consistent hashing, replication, quorum reads/writes, hot keys
Package delivery tracking Event ingestion, geo data, read model for customers, high write volume

A reliable structure for 45-55 minutes:

  1. Functional and non-functional requirements (latency, availability, consistency, scale numbers).
  2. Back-of-the-envelope estimates: requests per second, storage per year, bandwidth.
  3. API design (endpoints or RPCs) and data model.
  4. High-level diagram: clients, load balancer, services, databases, caches, queues.
  5. Deep dive into the hardest part the interviewer cares about.
  6. Failure modes, monitoring, and what you would do differently at 10x scale.

Amazon-specific free reading that also shows how Amazon thinks about operations:

Leadership Principles in technical rounds

Because each interviewer covers some LPs, your coding round may end with “Tell me about a time you had to dive deep to find a root cause” or “Tell me about a time you disagreed with your team”. Prepare at least two stories each for the principles that technical interviewers most often pair with SDE roles:

Principle Example technical story angle
Customer Obsession You changed a design because of real customer data or complaints
Ownership You fixed something outside your area because it hurt customers
Dive Deep You debugged a hard production issue by going below the dashboards
Deliver Results You shipped under a deadline and made explicit tradeoffs
Invent and Simplify You removed complexity, a dependency or a manual process
Have Backbone; Disagree and Commit You pushed back on a design with data, then committed to the decision
Insist on the Highest Standards You raised a quality bar: tests, alarms, code review rules
Bias for Action You made a reversible decision quickly with incomplete information

Full coverage of all 16 principles, common questions and a story bank template lives in the companion repo amazon-leadership-principles-interview.

Study plans: 2, 4 and 8 weeks

2-week sprint (you already know the patterns)

Days Focus Daily target
1-3 Hash maps, sliding window, heaps 4 problems, 1 timed
4-6 Graphs and grids, trees 4 problems, 1 timed
7 Mock OA: 2 problems in 90 minutes 1 mock
8-9 Design-a-data-structure, intervals 3 problems + 1 OOD prompt
10-11 System design: 2 prompts end to end 2 designs
12-13 LP stories: write 12-16 STAR stories 4 stories a day
14 Full mock loop: coding + design + LPs 1 mock

4-week plan (most people)

Week Coding Design Behavioral
1 Sections 1-3 (hashing, windows, heaps) Read 3 Builders’ Library articles List 20 projects and moments to mine for stories
2 Sections 4-5 (graphs, trees) 2 system design prompts Draft 8 STAR stories
3 Sections 6-8 (data structures, intervals, stacks) 2 OOD prompts + 1 system design Draft 8 more stories, add metrics
4 Section 9 + redo everything you missed 2 timed mock designs 2 mock behavioral interviews

8-week plan (first serious prep)

Double each week of the 4-week plan, add one timed 90-minute OA simulation per week, and spend the last week only on mocks and redoing failed problems.

Expectations by level

These are generalizations from public reports and Amazon’s own pages; your recruiter’s description wins.

Level Coding Design Behavioral depth
SDE I (new grad, early career) Main focus; mediums, clean code, tests OOD more likely than large-scale system design Stories from internships, school projects and teams
SDE II Still essential; expect a follow-up twist At least one system design round Stories with real production impact and metrics
Senior SDE (SDE III) Fewer coding rounds, higher bar on quality Ambiguous, large-scope design; mentoring others on design Cross-team influence, long-term ownership

Mock interview script

Run this with a friend; swap roles afterwards.

  1. (5 min) Interviewer asks one LP question. Candidate answers in STAR in under 3 minutes; interviewer asks two follow-ups (“What exactly did you do?”, “What would you do differently?”).
  2. (35 min) One medium problem from the tables above, chosen by the interviewer. Candidate clarifies, proposes brute force, optimizes, codes in a plain editor, tests by hand.
  3. (5 min) Follow-up twist: “Now the input is a stream” or “Now it does not fit in memory”.
  4. (10 min) Interviewer scores: problem solving, code quality, testing, communication, LP evidence. One concrete thing to fix next time.

Best resources

Resource Type Cost Best for
Amazon SDE II interview prep Official page Free The real format and criteria
Amazon Leadership Principles Official page Free Exact wording of all 16 LPs
NeetCode roadmap Problem list + videos Free (paid tier exists) Pattern-by-pattern practice
LeetCode Practice platform Free; Premium is paid Problems; Premium unlocks company tags
HackerRank Practice platform Free Getting used to the OA environment
The System Design Primer GitHub guide Free System design fundamentals
The Amazon Builders’ Library Articles by Amazon engineers Free How Amazon builds reliable services
Open Data Structures Open textbook Free (CC BY) Data structure refresher
Cracking the Coding Interview by Gayle Laakmann McDowell Book Paid Classic interview problem practice
Designing Data-Intensive Applications by Martin Kleppmann Book Paid Deep system design foundations
Pramp Peer mock interviews Free tier Practicing out loud with a stranger

Best pick if you only use three: Amazon’s official prep page (format), NeetCode’s roadmap (coding patterns), and the System Design Primer plus the Builders’ Library (design). Everything else is optional.

Running the solutions

The solutions/amazon.py file contains short, tested Python 3 solutions for the problems marked “Solution included”. They use only the standard library.

git clone https://github.com/Ralpberry-Labs/amazon-interview-questions.git
cd amazon-interview-questions
python3 -m unittest discover -v

Try each problem yourself first. Read the solution only after 30-40 minutes, or after you have written your own and want to compare.

FAQ

Are these the actual questions Amazon asks? No. Amazon does not publish its questions, and this guide does not use leaked material. These are public LeetCode problems that practice patterns frequently reported in public interview experiences. If you master the patterns, the exact question matters much less.

How hard is the Amazon coding interview? Most reports describe LeetCode medium problems, sometimes with an easy warm-up or a hard follow-up. The bar is less about trick algorithms and more about correct, clean, tested code plus clear communication.

Do I need LeetCode Premium for Amazon prep? No. Every pattern section here has free problems. Premium adds company-tagged lists, which some people find motivating, but it is optional.

Which programming language should I use? Any mainstream language you are fluent in. Python is popular because it is short; Java and C++ are common at Amazon. Amazon asks for syntactically correct code, so use the language you make the fewest mistakes in.

How many problems should I solve before an Amazon interview? Quality beats quantity. 100-150 well-understood problems across the patterns above is plenty for most people. Redo the ones you got wrong.

What is the Amazon Bar Raiser round? One interviewer in the loop is a trained Bar Raiser, usually from another team, who helps keep the hiring bar consistent across Amazon and makes the decision together with the hiring manager. It is not always a separate “type” of round, and you are usually not told who it is.

How long does the Amazon interview process take? Amazon’s SDE II page says to expect the outcome within about five business days after the loop. The full process from application to offer commonly takes a few weeks to a couple of months.

Can I reapply if I fail? Amazon’s OA page says candidates who do not advance after the assessment are encouraged to practice and reapply after six months. Ask your recruiter about cool-down periods after a full loop.

Is system design asked for SDE I? Large-scale system design is mainly for SDE II and above. SDE I candidates more often get object-oriented design or “logical and maintainable code” rounds. Ask your recruiter.

Can I use ChatGPT or other AI tools during the interview? No, not unless explicitly allowed. Reporting on Amazon’s guidelines says AI use during interviews can lead to disqualification.

Where to go next

Contributing

Corrections and additions are welcome. Please open an issue or pull request if:

Please do not submit confidential, NDA-covered or leaked interview questions, or copied paid content.

If this helped you, a star helps others find it.

More free resources

Part of the Ralpberry Labs open-source collection. See also Top 100 Open Source.