Amazon Interview Questions

Amazon Coding & Algorithms Interview Questions

Practice 689 real Amazon interview questions for 2026. Covers all top categories — Coding & Algorithms, Behavioral & Leadership, Machine Learning, Data Manipulation (SQL/Python), and System Design — across Software Engineer, Data Scientist, Machine Learning Engineer, Product Manager, and Business Intelligence Engineer roles. Real Amazon interview questions from actual interviews with detailed solutions; use this collection for interview preparation that emphasizes shipping at scale, measurable impact, and the company’s Leadership Principles. Expect coding-heavy assessments for Software Engineer candidates: frequent tree and dynamic-programming problems, two-array optimization patterns, nested object/path lookups, and system-design prompts that mirror product flows (online Minesweeper, pizza-ordering, credit-card and shipping/cost systems), plus leadership and collaboration behavioral prompts. Data Scientist rounds concentrate on experimentation and metrics (A/B design, hand p-values, D7 retention SQL), RAG/recommender evaluation, and product-impact analyses. ML Engineer questions focus on production model design, LLM/agent concepts, reliability (cold start, training stability, online vs offline gaps), and large-scale detection pipelines. PM interviews stress customer-obsessed stories, ambiguity, Alexa product launches, and domain-specific data pipelines. Prepare with timed coding practice, end-to-end experiment writeups, STAR stories framed to Leadership Principles, and mock system-design sessions.

689 Questions 1 Company08.11.2026
Showing 20 results
Role
Amazon logo
Amazon
Hard
Software Engineer

Minimize operations to reduce price difference

You are managing an inventory of products and want to adjust their prices. There are n products. The price of the i-th product is given by an integer ...

Coding & Algorithms
6
0
56 people solved
Oct 1, 2025
Amazon logo
Amazon
Hard
Software Engineer

Maximize memory capacity with primary-backup servers

You are helping to optimize the capacity of a cloud system. There are n servers, where n is always even. The memory capacity of the i-th server is giv...

Coding & Algorithms
3
0
58 people solved
Oct 1, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find earliest time password becomes irrecoverable

You are given a password string of length n and an attack order array attackOrder[1..n], a permutation of 1..n. At second i (1-indexed), the virus rep...

Coding & Algorithms
1
0
9 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find returning users from access logs

Given an unordered log of web access events, identify which users are returning (i.e., they have visited on at least two different calendar days). Eac...

Coding & Algorithms
1
0
8 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Compute grid shortest path with obstacles

You are given an m x n grid of integers where cells with value -1 represent obstacles and all other cells are traversable. Starting at (0, 0) and targ...

Coding & Algorithms
5
0
38 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Detect cycles in lists and graphs

Given a singly linked list, determine whether it contains a cycle. Implement an O( 1)-space algorithm and explain the intuition and correctness. Follo...

Coding & Algorithms
3
0
29 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Solve jumps and anagram-similarity problems

You are given two independent tasks. Task A (Maximize calories over jumps): - There are n blocks with integer heights height[i] ≥ 0. - You start on th...

Coding & Algorithms
2
0
27 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find returning users from access logs

Given a large user access log, parse it and identify which user_ids are returning customers—i.e., they have at least one visit on two or more distinct...

Data Manipulation (SQL/Python)
0
0
5 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Explain work-simulation approach under ambiguity

Behavioral: Prioritizing and Delivering Under Ambiguity in a Time-Boxed Simulation Context You are a software engineer in a technical screen. You are ...

Behavioral & Leadership
5
0
50 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Maximize optional tasks under daily limit

You are given an integer limit and two integer arrays required and optional of length n. For each day i, you must schedule required[i]. If time remain...

Coding & Algorithms
1
0
25 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Insert and merge an interval

You are given a list of pairwise non-overlapping closed intervals [si, ei] sorted by start time, and a new interval [s, e]. Insert [s, e] into the lis...

Coding & Algorithms
5
0
44 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Detect cycle in a directed graph

Given a directed graph represented by an adjacency list with n vertices and m edges, determine whether the graph contains a cycle. Describe and implem...

Coding & Algorithms
6
0
65 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Search target in unknown-length sorted array

You have read-only access to a sorted, increasing array-like interface of unknown length that supports get(i), which returns a valid integer for in-bo...

Coding & Algorithms
4
0
51 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find all pairs summing to target in sorted array

Given a non-decreasing array of integers nums and an integer target, return all unique pairs of indices (i, j) with i < j such that nums[i] + nums[j] ...

Coding & Algorithms
6
0
45 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Compute tree diameter

Given a (potentially large) binary tree, compute its diameter (the number of edges on the longest path between any two nodes). Implement an O(n) solut...

Coding & Algorithms
4
0
41 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Count regions with DFS

Given an m x n grid of 0s and 1s, count the number of connected regions consisting of 1s using depth-first search (4-directional adjacency). Return th...

Coding & Algorithms
6
0
44 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Machine Learning Engineer

Implement binary search lower/upper bounds

Question Given a non-decreasing sorted integer array nums of length n and a target value, implement two functions using binary search: 1. lower_bound(...

Coding & Algorithms
5
0
45 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find longest segment with endpoints > interior

Given an integer array nums, find the length of the longest contiguous segment [i..j] (j−i+1 ≥ 2) such that both endpoints are strictly greater than e...

Coding & Algorithms
2
0
23 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find minimum days to deliver all orders

You manage N delivery centers labeled 1..N and an array orderCityList where each element is the destination city of one order (city IDs are in 1..N). ...

Coding & Algorithms
8
0
60 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Compute rightmost-smaller delay times

Given an integer array priorities, define delay[i] as the distance to the rightmost index j > i such that priorities[j] < priorities[i]; if no such in...

Coding & Algorithms
3
0
36 people solved
Sep 6, 2025

Frequently Asked Questions

How difficult are Amazon interview questions for software, data, and product roles?
Amazon interviews are competitive and deliberately broad: expect medium-to-hard algorithmic coding for software roles, deep design thinking for system and architecture questions, rigorous experiment and metrics work for data roles, and leadership-driven behavioral prompts for product and PM positions. Difficulty scales with level; early-career loops focus on correctness and problem patterns, senior loops demand scalable design, tradeoff justification, and measurable impact. The Bar Raiser raises the bar on long-term ownership and cultural fit. Overall, the process weeds for both technical depth and the ability to explain tradeoffs, so prepare to demonstrate repeatable problem solving under time pressure.
What is the Amazon interview process and where do the top categories and positions appear in the loop?
Amazon typically uses a staged process: resume screen, role-specific assessments or phone screens in some tracks, then the onsite loop of 4–6 interviews including a Bar Raiser. Coding and algorithms rounds dominate for Software Engineer interviews, while system design appears in one or more senior technical rounds. Data Scientist interviews blend SQL/Python casework, A/B test design, and inferential questions. Machine Learning Engineer loops probe model deployment, offline to online debugging, and NLP/agent design. Product and BI roles focus on metrics, product tradeoffs, and Leadership Principles throughout the loop, with role-specific deep dives tied to the job description.
How long should I prepare for Amazon interviews and what should a timeline look like?
Aim for a focused 6–12 week plan for experienced roles and 4–8 weeks for early-career candidates. Weeks 1–3: shore up fundamentals — arrays, trees, graphs, DP, and core SQL windowing. Weeks 4–6: simulate timed coding rounds, practice system design high-level tradeoffs, and build STAR stories mapped to Leadership Principles. Weeks 7–10: run mock loops with behavioral pressure, refine experiment and ML case studies, and rehearse tradeoff conversations. Leave final 1–2 weeks for targeted practice on role-specific themes such as shipping costs, RAG evaluation, or Alexa product scenarios.
Which key subtopics should I master to perform well across Amazon's top roles?
Master algorithmic patterns including trees, dynamic programming, two-pointer and graph traversals, and complexity justification for coding rounds. For system design, focus on APIs, data models, scaling, caching, reliability, and monitoring. Data roles require SQL window functions, cohort and retention analysis, A/B test design and power, and RAG/evaluation methods for ML-backed features. Machine learning engineers must know model stability, cold-start strategies, online-offline mismatch debugging, and agent alignment basics. Product candidates should be fluent in metric design, customer-observed data pipelines, and prioritization with quantifiable impact.
What standout tips and common pitfalls should I know before interviewing at Amazon?
Start every behavioral or technical story with context and measurable outcomes; interviewers care about specific impact and tradeoffs. Use STAR for leadership prompts but emphasize metrics and follow-on changes. In coding, verbalize assumptions, test edge cases, and discuss complexity and alternative approaches. In design rounds, ask clarifying questions, scope deliberately, and justify scaling choices. Common pitfalls include weak quantification of impact, ignoring the Leadership Principles, failing to probe requirements, and delivering designs without operational considerations. Practice mock loops and incorporate Bar Raiser-style feedback to close gaps before the real loop.

Explore more Amazon interview questions

Jump straight to Amazon questions for a specific role or category.

By role
By category
In-depth guides
Across all companies

Featured Amazon interview prep guides

Concept walkthroughs, worked examples, and the real questions from candidate reports.

Editorial prep
Data Scientist
Amazon interview
Read the guide
Editorial prep
Software Engineer
Amazon interview
Read the guide