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
Hard
Software Engineer Locked

Serialize and deserialize a binary tree

This question evaluates competency in designing robust serialization formats and manipulating binary tree data structures, including preservation of s...

Coding & Algorithms
8
0
72 people solved
Jan 22, 2026
Amazon logo
Amazon
Medium
Software EngineerIntern Locked

Return a valid task order

This question evaluates understanding of graph algorithms and dependency resolution, testing the ability to produce a valid ordering of tasks and reco...

Coding & Algorithms
3
0
39 people solved
Jan 21, 2026
Amazon logo
Amazon
Medium
Software Engineer

Maintain real-time top-K products from events

Design a data structure/class that ingests a stream of product events and returns the current top‑K products at any time. Events include {timestamp, p...

Coding & Algorithms
3
1
57 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Implement robust debounce and throttle in JavaScript

Implement debounce(fn, wait, options) and throttle(fn, wait, options) in JavaScript. Support leading/trailing invocation toggles, maxWait for throttle...

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

Solve string partition and equal-sum package problems

Solve string partition and equal-sum package problems 1) Given a string itemCategories (lowercase English letters) and an integer k (0 ≤ k ≤ 26), coun...

Coding & Algorithms
2
0
44 people solved
Aug 1, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find the K-th Smallest Value in Two Sorted Arrays

Find the K-th Smallest Value in Two Sorted Arrays Given two nondecreasing integer arrays and a one-based integer k, return the k-th smallest value in ...

Coding & Algorithms
0
0
1 people solved
Mar 26, 2026
Amazon logo
Amazon
Medium
Machine Learning Engineer

Implement K-means and solve interval/frequency tasks

Task 1 — Describe/implement K-means clustering Given: - A data matrix X with shape (n_samples, d). - An integer k (number of clusters). Explain (or wr...

Coding & Algorithms
7
0
66 people solved
Dec 15, 2025
Amazon logo
Amazon
Medium
Software Engineer

Determine string buildability from dictionary

Given a non-empty string s and a list of non-empty words dict, determine whether s can be formed by concatenating words from dict with unlimited reuse...

Coding & Algorithms
3
0
42 people solved
Sep 6, 2025
Amazon logo
Amazon
Easy
Software EngineerNew Grad

Implement Interview Coding Problems

Solve the following independent coding tasks from a new-grad software engineering interview. 1. Implement a hash map from scratch. - Support integer k...

Coding & Algorithms
1
0
16 people solved
Nov 22, 2025
Amazon logo
Amazon
Medium
Software EngineerSenior+ Locked

Solve Shipping and Bundle-Cost Problems

This question evaluates algorithmic reasoning for scheduling and capacity planning (minimum daily shipping capacity) and combinatorial optimization wi...

Coding & Algorithms
2
0
39 people solved
Nov 17, 2025
Amazon logo
Amazon
Easy
Data Engineer

Solve Two String Problems

You are asked to solve the following two coding problems: 1. Unique Morse Code Transformations You are given an array of lowercase English words, word...

Coding & Algorithms
19
0
150 people solved
Feb 23, 2026
Amazon logo
Amazon
Medium
Software Engineer

Design rolling-window top-K click tracker

Design rolling-window top-K click tracker You receive a high-volume stream of click events (timestamp in ms, url). Implement a data structure with two...

Coding & Algorithms
3
0
43 people solved
Jul 31, 2025
Amazon logo
Amazon
Hard
Software EngineerSenior+

Evaluate IP Access Rules

You are given a list of IPv4 access-control rules. Each rule consists of: - an action: allow or deny - a CIDR block such as 192.168.0.0/16 You are als...

Coding & Algorithms
15
0
203 people solved
Feb 17, 2026
Amazon logo
Amazon
Medium
Software Engineer

Implement ad matching and delivery routing

Implement ad matching and delivery routing Part A: Implement a data structure for an ad-matching service that supports add(campaign), remove(campaign)...

Coding & Algorithms
5
0
55 people solved
Jul 16, 2025
Amazon logo
Amazon
Medium
Software Engineer Locked

Find max equal-frequency block count for each prefix

This question evaluates proficiency in string processing, frequency-vector reasoning, and prefix-based partitioning to determine equal-frequency conti...

Coding & Algorithms
24
0
201 people solved
Feb 12, 2026
Amazon logo
Amazon
Medium
Software Engineer Locked

Compute total revenue from greedy VM rentals

This question evaluates understanding of greedy allocation strategies and the ability to maintain dynamic summaries (tracking current maximum and smal...

Coding & Algorithms
23
0
307 people solved
Feb 12, 2026
Amazon logo
Amazon
Hard
Software EngineerIntern Locked

Merge two sorted arrays in-place

This question evaluates array-manipulation and in-place algorithm skills, including understanding of sorted-data merging, index/pointer management, an...

Coding & Algorithms
8
0
107 people solved
Feb 8, 2026
Amazon logo
Amazon
Hard
Software Engineer

Find Affected Services After Shutdown

You are given a set of services and their dependency relationships. The input is a hash map where each key is a service name, and the value is a list ...

Coding & Algorithms
36
0
357 people solved
Jan 26, 2026
Amazon logo
Amazon
Easy
Software EngineerIntern Locked

Print all odd numbers from an integer list

This question evaluates proficiency with array/list manipulation, parity checking, and handling edge cases such as negative values and integers outsid...

Coding & Algorithms
6
0
79 people solved
Jan 22, 2026
Amazon logo
Amazon
Medium
Software Engineer

Detect words formed by multiple dictionary parts

Given an array words of up to 100,000 non-empty lowercase strings (total characters ≤ 1,000, 000), return all strings that can be formed by concatenat...

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

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