Amazon SDE Interview Questions (2026): process, questions and answers
The Amazon SDE interview usually tests data structures, algorithms, system design and leadership principles. Use this guide to rehearse short, structured answers and focus your final 48 hours on high‑impact practice.
Preparing for Amazon? Rehearse these questions with Interview AI Helper: ask any question and get a suggested answer in seconds, written from your own resume.
Free 5-minute demoHow the Amazon SDE interview usually works
- Online assessment: Candidates often receive a timed coding test with 2‑3 problems covering arrays, strings and basic algorithms.
- Phone screen: Usually one or two technical calls where you solve a problem on a shared editor and discuss your approach.
- Onsite loop: Often four to five back‑to‑back interviews covering coding, design, and behavioural questions.
- HR round: Typically a final conversation about your experience, motivations and Amazon leadership principles.
Technical questions and answers
Explain how a hash table handles collisions using chaining.
A hash table computes a bucket index with a hash function; if multiple keys map to the same index, chaining stores those entries in a linked list or dynamic array at that bucket. Insert adds the new node to the list, search iterates the list comparing keys, and delete removes the matching node. Average time complexity is O(1) if the load factor stays low, but worst‑case degrades to O(n) when many keys collide.
Write a function to find the longest substring without repeating characters.
Use a sliding window with two pointers and a hash set. Expand the right pointer, adding characters to the set until a duplicate appears, then move the left pointer removing characters until the duplicate is removed. Track the maximum window size. This runs in O(n) time and O(min(n, alphabet)) space.
What is the time complexity of quicksort in the average and worst case?
Average‑case quicksort runs in O(n log n) because the pivot typically splits the array into roughly equal halves, giving a recursion depth of log n. The worst case occurs when the pivot is the smallest or largest element each time, leading to O(n²) time due to a recursion depth of n. Randomized pivot selection mitigates the worst case in practice.
How does a binary search tree differ from a balanced BST like AVL or Red‑Black?
A plain binary search tree only guarantees the left subtree contains smaller keys and the right subtree larger keys; its height can become O(n) in the worst case, causing linear‑time operations. Balanced trees such as AVL or Red‑Black enforce height‑balancing rules after inserts and deletes, keeping height O(log n) and ensuring search, insert and delete run in O(log n) time.
Implement a function to detect a cycle in a singly linked list.
Use Floyd’s Tortoise‑and‑Hare algorithm: initialise two pointers, slow moves one step and fast moves two steps each iteration. If they ever meet, a cycle exists; if fast reaches null, the list is acyclic. This uses O(1) extra space and O(n) time.
Interview with Amazon coming up?
Practise these SDE questions out loud and get suggested answers in real time, based on your own resume. Free 5-minute demo, no subscription.
Try the free demoExplain the difference between process‑level and thread‑level parallelism.
Process‑level parallelism runs separate processes with independent memory spaces, communicating via IPC, which provides strong isolation but higher context‑switch overhead. Thread‑level parallelism runs multiple threads within the same process sharing memory, allowing faster communication and lower overhead, but requiring synchronization to avoid race conditions.
What is memoization and when would you use it?
Memoization caches the results of expensive pure function calls, storing outputs keyed by input arguments. When the same inputs recur, the cached result is returned instantly, reducing time complexity from exponential to polynomial in many recursive problems like Fibonacci or DP on trees. Use it when the function is deterministic and the input space is manageable.
Describe how a B‑Tree improves disk‑based database performance.
A B‑Tree stores many keys per node, matching the disk block size, so each read/write accesses a large chunk of data. Its height stays low (log base m of n, where m is the branching factor), meaning few disk I/O operations for search, insert or delete. This reduces latency compared with binary trees that require many small reads.
Write pseudo‑code for merging two sorted arrays into a single sorted array.
``
function merge(A,B):
i=j=k=0
C = new array of size len(A)+len(B)
while i<len(A) and j<len(B):
if A[i]<=B[j]: C[k]=A[i]; i+=1
else: C[k]=B[j]; j+=1
k+=1
copy remaining elements from A or B into C
return C
``The loop runs O(n+m) time and uses O(n+m) extra space.
What is a race condition and how can you prevent it?
A race condition occurs when two or more threads access shared mutable state concurrently, and the final outcome depends on the timing of their operations. Prevent it by using synchronization primitives such as mutexes, locks, atomic variables, or by designing immutable data structures, ensuring that only one thread can modify the critical section at a time.
Scenario questions
You discover a latency spike in an order‑processing service during peak traffic. How do you approach it?
Start by reproducing the issue in a staging environment, then collect metrics (CPU, memory, I/O, DB latency) to narrow the component. Use tracing to pinpoint the hot path, examine recent code changes, and check queue backlogs. Propose a short‑term mitigation (e.g., throttling, scaling) and a long‑term fix (optimizing query, caching). Communicate findings and timeline to stakeholders.
A teammate’s code causes intermittent failures in a microservice you own. How do you handle it?
First, gather logs and error samples to understand failure patterns. Replicate the issue locally if possible, then open a collaborative debugging session with the teammate, sharing observations without blame. Identify the root cause, perhaps a contract mismatch or race condition, and agree on a fix. Follow up with a post‑mortem to update documentation and add tests preventing recurrence.
Your service must handle a new feature that scales from a few hundred to millions of requests per second. What design considerations do you raise?
Discuss horizontal scalability: stateless design, load‑balancer placement, and sharding of data. Emphasize async processing via queues, caching hot data with an in‑memory store, and back‑pressure mechanisms. Consider rate limiting, fault isolation (circuit breakers), and monitoring for latency and error rates. Outline a rollout plan with canary deployments and automated rollback.
HR and behavioural questions
Tell me about a time you delivered a project with a tight deadline.
Use the STAR format: Situation, a critical feature needed for a sales push; Task, lead a 4‑person team to ship within two weeks; Action, broke work into daily sprints, held stand‑ups, removed blockers, and wrote automated tests; Result, delivered on schedule, increased conversion by 12 % and earned a team appreciation email.
Give an example of when you disagreed with a peer and how you resolved it.
Describe the context, the differing viewpoints, and how you practiced active listening. Explain that you gathered data, presented a balanced analysis, and proposed a compromise that met both quality and timeline goals. Highlight that the resolution improved the design and strengthened the working relationship.
Describe a situation where you had to dive deep to solve a problem.
Outline the problem, such as an obscure bug in production. Detail how you examined logs, added tracing, consulted source control history, and wrote a small reproducible test. Show that the investigation led to fixing a subtle concurrency issue, preventing future outages and earning recognition from the reliability team.
How have you shown ownership of a product beyond your immediate responsibilities?
Explain that you noticed recurring user complaints, proactively drafted a requirements doc, coordinated with UX and backend owners, and delivered an enhancement that reduced support tickets by 30 %. Emphasize that you tracked metrics post‑release and iterated based on feedback, demonstrating end‑to‑end responsibility.
Your last 48 hours before the interview
- Review the Amazon Leadership Principles and map personal stories to each.
- Solve three medium‑difficulty coding problems on arrays, trees and graphs, writing the solution on a whiteboard.
- Read one system‑design article about scaling e‑commerce services and sketch a high‑level diagram.
- Practice the STAR method with the behavioural questions, speaking aloud to improve fluency.
- Do a mock phone interview with a peer, focusing on clear communication and time‑boxed answers.
- Rest early, hydrate, and prepare a clean, quiet interview space with necessary tools.
Common mistakes to avoid
- Writing code without explaining your thought process; avoid by narrating each step and asking clarifying questions.
- Getting stuck on optimal complexity before a correct baseline; start with a working solution, then iterate to improve.
- Over‑loading answers with irrelevant details; keep responses concise and tied to the question.
- Neglecting the STAR structure for behavioural questions; practice framing each story with Situation, Task, Action, Result.
Frequently asked questions
How many interview rounds does Amazon typically have for an SDE role?
Candidates commonly report a total of four to six rounds, including an online assessment, one or two phone screens, an onsite loop of three to four technical and behavioural interviews, and a final HR conversation.
What topics should I focus on for the coding part?
Prioritize arrays, strings, linked lists, trees, graphs, hash tables, sorting and basic dynamic programming. Practice writing clean code with proper variable names and edge‑case handling.
Do I need to know specific Amazon services for system design?
It helps to be familiar with concepts Amazon uses, such as S3‑style object storage, DynamoDB‑like key‑value stores, and message queues, but the interview assesses general scalability, reliability and trade‑off reasoning rather than exact product knowledge.
Can I use a whiteboard if the interview is virtual?
Many virtual interviews provide a shared digital whiteboard or coding editor. Candidates usually report using a physical whiteboard at home or a tablet to sketch diagrams while sharing their screen, ensuring visibility for the interviewers.
Interview with Amazon coming up?
Practise these SDE questions out loud and get suggested answers in real time, based on your own resume. Free 5-minute demo, no subscription.
Try the free demoMore Amazon interview guides
- Amazon Data Analyst interview questions
- Amazon DevOps Engineer interview questions
- Amazon Software Engineer (Fresher) interview questions
- Amazon Java Developer interview questions
- Amazon Python Developer interview questions
- Amazon QA Automation Tester interview questions
Related reading
This is an independent preparation guide based on commonly reported interview patterns. The process varies by team, location and year. Interview AI Helper is not affiliated with Amazon.
← All interview question guides