Amazon Coding & Algorithms Interview Questions

Amazon Coding & Algorithms interview questions focus heavily on data structures, algorithmic problem solving, and clear on-the-spot implementation. What’s distinctive is the combination of speed and depth: interviewers evaluate correctness, time and space complexity, edge-case handling, and the candidate’s ability to communicate a stepwise approach under time pressure. Expect array/string manipulation, trees/graphs, hashing, dynamic programming, and occasional system- or design-lite prompts for senior roles, with behavioral ties to Amazon’s leadership principles sometimes woven into technical rounds. Typical loops begin with one or two timed phone screens followed by an onsite or virtual loop of multiple interviews that mix pure coding, design (for higher levels), and behavioral assessment; a bar-raiser may appear to ensure hiring standards. For effective interview preparation, practice timed coding problems across core topics, run mock interviews that force you to verbalize decisions, write clean, testable code, and rehearse concise STAR-style stories that highlight ownership and impact. Developing pattern recognition for problem types and routinely reviewing complexity and edge cases will make your responses faster, safer, and more persuasive.

233 Questions 1 Company08.11.2026
Showing 20 results
Role
Amazon logo
Amazon
Easy
Software Engineer

Compute minimal operations and optimal server pairing

You are given two independent coding problems. Problem 1: Minimum range-increments to make an array nondecreasing Given an integer array power of leng...

Coding & Algorithms
15
0
115 people solved
Dec 17, 2025
Amazon logo
Amazon
Medium
Software Engineer AI

Calculate Circular Route Query Distance

You are given a circular route with n stops numbered 0 to n - 1. The array distances has length n, where distances[i] is the clockwise distance from s...

Coding & Algorithms
0
0
10 people solved
Apr 6, 2026
Amazon logo
Amazon
Medium
Software EngineerIntern Locked

Replace Delimited Tokens in a String

This question evaluates string parsing, token recognition, and dictionary lookup competencies for robust text replacement, including handling malforme...

Coding & Algorithms
2
0
15 people solved
May 28, 2026
Amazon logo
Amazon
Easy
Data Scientist

Solve two string DP/hash problems

Solve the following two coding questions. 1) Unique Morse Code Transformations You are given an array of strings words (lowercase English letters). Us...

Coding & Algorithms
79
0
599 people solved
Feb 13, 2026
Amazon logo
Amazon
Medium
Software Engineer Locked

Schedule vector ops on heterogeneous cores

This question evaluates understanding of scheduling and load-balancing heuristics for heterogeneous processors, algorithmic complexity reasoning, and ...

Coding & Algorithms
8
0
75 people solved
Jan 2, 2026
Amazon logo
Amazon
Medium
Software Engineer

Solve three coding tasks: binary search, tree path, subarray

Solve three coding tasks: binary search, tree path, subarray Solve the following coding tasks: 1) In a sorted array, every value appears exactly twice...

Coding & Algorithms
7
0
55 people solved
Aug 10, 2025
Amazon logo
Amazon
Medium
Software Engineer

Solve server updates and grid inconvenience minimization

1) You are given an integer array server of length n, where server[i] is the number of requests the i-th server can process. Over multiple days, you r...

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

Maximize Value Under a Budget

This question evaluates combinatorial optimization and algorithm design skills for resource-constrained selection problems, focusing on concepts exemp...

Coding & Algorithms
1
0
12 people solved
May 22, 2026
Amazon logo
Amazon
Medium
Software EngineerIntern Locked

Count Connected Components in an Undirected Graph

This question evaluates understanding of graph connectivity and cycle detection, measuring competency in reasoning about connected components and the ...

Coding & Algorithms
1
0
16 people solved
May 19, 2026
Amazon logo
Amazon
Medium
Machine Learning Engineer

Implement PyTorch training loop

Implement a basic PyTorch training loop You are given a PyTorch neural network model, a DataLoader that yields (inputs, targets) batches, an optimizer...

Coding & Algorithms
9
0
93 people solved
Dec 8, 2025
Amazon logo
Amazon
Medium
Software Engineer

Implement autocomplete with top-K suggestions

Implement an autocomplete component that, given a history of query strings with frequencies, returns the top K suggestions for an input prefix in real...

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

Optimize with a cache/hash map

Question This is a follow-up to your existing implementation (for example, a script that repeatedly resolves file paths or parses license strings into...

Coding & Algorithms
4
0
84 people solved
Sep 6, 2025
Amazon logo
Amazon
Hard
Software Engineer

Minimize Branch Merge Conflicts

You are given several feature branches that must all be merged into the main branch. Each branch contains a sequence of commits, and each commit modif...

Coding & Algorithms
11
0
179 people solved
Jan 12, 2026
Amazon logo
Amazon
Medium
Software Engineer

Find longest common contiguous subarray

Given two integer arrays A and B, find the length of the longest contiguous subarray that appears in both arrays. If multiple exist, return any one pa...

Coding & Algorithms
4
0
42 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software EngineerIntern

Find a valid dependency order

You are given n tasks labeled from 0 to n - 1 and a list of dependency pairs dependencies, where each pair [a, b] means task b must be completed befor...

Coding & Algorithms
7
0
90 people solved
Feb 15, 2026
Amazon logo
Amazon
Medium
Software Engineer AI Locked

Implement a Worker Hours Register

This question evaluates data structures and algorithms skills for temporal event tracking, interval arithmetic, stateful session management, ranking, ...

Coding & Algorithms
14
0
106 people solved
Feb 14, 2026
Amazon logo
Amazon
Medium
Software Engineer Locked

Answer two coding questions (SQL and DP)

This multi-part question evaluates SQL query skills (handling distinct values, aggregation and edge-case NULL results) and algorithmic proficiency in ...

Coding & Algorithms
26
0
222 people solved
Feb 12, 2026
Amazon logo
Amazon
Easy
Software EngineerIntern Locked

Solve array duplicates and two-type subarray

These problems evaluate proficiency with array manipulation, frequency and membership reasoning, and algorithmic analysis of time and space complexity...

Coding & Algorithms
10
0
91 people solved
Feb 11, 2026
Amazon logo
Amazon
Medium
Software EngineerSenior+

Determine Whether a Binary Tree Is a Valid BST

Determine Whether a Binary Tree Is a Valid BST Problem Given a binary tree, determine whether the entire tree satisfies the strict binary-search-tree ...

Coding & Algorithms
0
0
4 people solved
Apr 15, 2026
Amazon logo
Amazon
Medium
Software Engineer Locked

Build the Largest Available Sequence

This question evaluates algorithmic problem-solving skills in state simulation, constrained selection, and lexicographic sequence maximization, measur...

Coding & Algorithms
5
0
78 people solved
Apr 14, 2026

Frequently Asked Questions

How difficult are Amazon Coding & Algorithms interview questions?
Amazon Coding & Algorithms interview questions typically range from medium to hard. Early screens and online assessments tend to include medium problems that test correctness, edge-case handling, and basic optimization, while onsite coding rounds push toward harder algorithmic challenges that require solid data-structure intuition, efficient designs, and careful complexity analysis. Interviewers evaluate how you reason through tradeoffs, communicate your approach, and iterate under time pressure. Preparing realistic timed practice, learning to explain constraints and invariants clearly, and polishing test-case coverage will help you reliably perform at the company’s expected difficulty level.
What does the Amazon interview process look like and where do Coding & Algorithms questions appear?
Coding and algorithmic problems appear throughout Amazon’s technical hiring funnel: they commonly start in the online assessment or phone screen and continue as core rounds during the onsite or virtual loop. Early stages focus on single-problem implementation and correctness, while later technical interviews assess algorithmic depth, optimizations, and robustness under follow-up prompts. Parallel rounds may cover system design or behavioral evaluations, but coding rounds are central for software-engineering roles and often factor heavily in hiring decisions. Expect interviews to probe both your code and your problem-solving rationale, with interviewers asking for clarifications, complexity analysis, and test cases.
How should I structure a preparation timeline for Amazon Coding & Algorithms interviews?
Plan a structured timeline that balances fundamentals, applied practice, and mock interviews. Over eight to twelve weeks you can build a strong foundation by reviewing core data structures and algorithm patterns, then transition into daily timed problem solving and focused practice on weak areas. Regularly simulate interview conditions with timed questions and live mock interviews to practice explanation and pacing. Reserve time near the end for targeted review of past mistakes, readability and testing habits, and a couple of full-loop mock interviews. Shorter intensive timelines can work, but consistency and deliberate feedback cycles accelerate readiness most effectively.
What key subtopics should I master for Coding & Algorithms interviews at Amazon?
Prioritize mastery of arrays and strings, trees and graphs (BFS/DFS, topological order), dynamic programming patterns, hashing and two-pointer techniques, heaps and priority queues, and common greedy and binary-search approaches. Understanding complexity analysis, tradeoffs between time and space, and practical implementation details like handling nulls, overflow, and edge cases is essential. Equally important are writing clean, modular code and communicating thought processes clearly while iterating from brute-force to optimized solutions. Practicing pattern recognition and learning to adapt known templates to novel problem constraints will cover most frequent question types.
What practical tips will help me stand out, and what common pitfalls should I avoid during Amazon Coding & Algorithms interviews?
Stand out by clarifying requirements up front, proposing a brute-force idea first, and then iterating toward optimizations while explaining complexity tradeoffs. Verbally walk through representative test cases, handle edge cases explicitly, and keep code readable with clear variable names and small helper functions. Manage time by setting mini-milestones: plan, code, test, and optimize. Common pitfalls include diving into code without a plan, neglecting to test edge cases, ignoring interviewer hints, and getting stuck on micro-optimizations early. Unless an interviewer permits it, avoid using external assistants during live interviews and focus on demonstrating your independent problem-solving skills.

Explore more Amazon Coding & Algorithms interview questions

Real questions from candidate reports, grouped by role, topic and company.

By role
Other categories at Amazon
Coding & Algorithms questions at other companies
Browse all