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
Medium
Software Engineer

Minimum Path Length Through a Grid With One Allowed Cell Conversion

You are given an m x n grid grid where every cell holds either 1 (an open cell you may stand on) or 0 (a blocked cell). You start at the top-left cell...

Coding & Algorithms
1
0
16 people solved
Jun 30, 2026
Amazon logo
Amazon
Medium
Software Engineer

Solve Nearby Inventory and Word Segmentation Tasks

Two Algorithmic Tasks Implement both parts. They are independent and should have separate functions. Part A - Nearby Centers with Inventory An undirec...

Coding & Algorithms
1
0
15 people solved
Feb 2, 2026
Amazon logo
Amazon
Medium
Software Engineer

Find Valid IP Addresses in Files

You are given an absolute or relative path to a directory on the local file system. Write a program that recursively traverses every subdirectory unde...

Coding & Algorithms
37
0
293 people solved
Apr 28, 2026
Amazon logo
Amazon
Medium
Software Engineer Locked

Drone Circular Route — Minimum Total Travel Cost

This question tests a candidate's ability to apply dynamic programming to combinatorial optimization, specifically the Traveling Salesman Problem (TSP...

Coding & Algorithms
1
0
8 people solved
Jun 12, 2026
Amazon logo
Amazon
Hard
Software Engineer

Find a Maximum-Sum Window in a Sparse Array

Find a Maximum-Sum Window in a Sparse Array An integer array is represented by constant-value segments instead of individual elements. Each segment [s...

Coding & Algorithms
1
0
13 people solved
Jul 10, 2026
Amazon logo
Amazon
Medium
Software Engineer

Add One Source to Minimize Grid Inconvenience

Add One Source to Minimize Grid Inconvenience Implement min_max_inconvenience(grid). grid is a non-empty rectangular matrix containing 0 and 1. A cell...

Coding & Algorithms
2
0
30 people solved
Jul 9, 2026
Amazon logo
Amazon
Hard
Software EngineerSenior+

Return the Vertical Traversal of a Binary Tree

Return the Vertical Traversal of a Binary Tree Problem Implement verticalTraversal(nodeValues, left, right, root) -> columns. Node root is at row 0, c...

Coding & Algorithms
0
0
10 people solved
Jan 1, 2026
Amazon logo
Amazon
Medium
Data Scientist

Implement a high-throughput web crawler safely

Design and code (pseudocode acceptable) a multi-threaded web crawler that favors breadth-first discovery while continuously running analysis tasks on ...

Coding & Algorithms
11
0
139 people solved
Oct 13, 2025
Amazon logo
Amazon
Easy
Software Engineer Locked

Find Unique Target-Sum Pairs

This question evaluates array-processing skills, correctness in handling duplicate values, and the ability to identify unique value pairs whose sums m...

Coding & Algorithms
2
0
25 people solved
May 2, 2026
Amazon logo
Amazon
Medium
Software Engineer

Solve two set and graph problems

Implement solutions for the following two data-structure / algorithm problems. --- Problem 1: Friend-purchase recommendations You are given three enti...

Coding & Algorithms
18
0
165 people solved
Oct 31, 2025
Amazon logo
Amazon
Hard
Machine Learning EngineerNew Grad

Implement Optimal Bucket Batching

You are given an array lengths of K document lengths and an integer G representing the number of available GPUs. A batch is assigned to one GPU, and e...

Coding & Algorithms
2
0
34 people solved
Apr 27, 2026
Amazon logo
Amazon
Medium
Software EngineerNew Grad

Solve Three Algorithm Variants

You are given three independent coding problems. For each one, describe and implement an efficient solution. 1. Generate queue arrangements - You a...

Coding & Algorithms
1
0
22 people solved
Apr 10, 2026
Amazon logo
Amazon
Medium
Software Engineer Locked

Find Conflicting Events

This question evaluates algorithmic problem-solving in coding and algorithms, focusing on grouping, sorting, and sliding-window techniques applied to ...

Coding & Algorithms
1
0
9 people solved
Jun 19, 2026
Amazon logo
Amazon
Medium
Software Engineer Locked

Kth Largest Perfect Binary Subtree

This question evaluates a candidate's ability to combine tree traversal with structural validation, requiring recognition of perfect binary subtrees a...

Coding & Algorithms
2
0
8 people solved
Jun 19, 2026
Amazon logo
Amazon
Medium
Machine Learning Engineer Locked

Implement Top-p (Nucleus) Sampling in NumPy

This coding question tests practical implementation of top-p (nucleus) sampling, a core decoding strategy in large language models. It evaluates NumPy...

Coding & Algorithms
0
0
11 people solved
Jun 18, 2026
Amazon logo
Amazon
Medium
Software EngineerNew Grad Locked

Detect and Break a Cycle in a Singly Linked List

This question tests practical knowledge of linked list traversal and pointer manipulation, specifically the ability to detect and resolve cycles using...

Coding & Algorithms
0
0
13 people solved
Jun 15, 2026
Amazon logo
Amazon
Medium
Software EngineerNew Grad Locked

Minimum Bills and Coins to Make Change

This question tests a candidate's grasp of greedy algorithms applied to a classic coin-change problem with fixed denominations. It evaluates practical...

Coding & Algorithms
1
0
11 people solved
Jun 15, 2026
Amazon logo
Amazon
Medium
Software EngineerNew Grad Locked

Minimum Drone Delivery Time on a Ring of Hubs

This question tests a candidate's grasp of circular graph traversal and greedy distance minimization on ring-structured topologies. It evaluates algor...

Coding & Algorithms
0
0
7 people solved
Jun 15, 2026
Amazon logo
Amazon
Medium
Software Engineer

Build a BFS Web Crawler

Implement a web crawler for a single website. You are given: - A starting URL startUrl - A function fetch(url) that returns the HTML content of a page...

Coding & Algorithms
18
0
143 people solved
Mar 12, 2026
Amazon logo
Amazon
Hard
Software Engineer Locked

Implement Datacenter Router Commands

This question evaluates proficiency in stateful command processing, input validation, geospatial computation (Haversine distance), deterministic sorti...

Coding & Algorithms
2
0
16 people solved
Jun 5, 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