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

Decide reachability with buses and limited walking

You are given: ( 1) a start point (xs, ys), ( 2) an end point (xe, ye), ( 3) an integer K, and ( 4) an undirected graph of bus stations where each nod...

Coding & Algorithms
3
0
38 people solved
Jul 31, 2025
Amazon logo
Amazon
Medium
Software Engineer

Solve LeetCode string and list problems

Question LeetCode 767. Reorganize String LeetCode 23. Merge k Sorted Lists LeetCode 138. Copy List with Random Pointer https://leetcode.com/problems/r...

Coding & Algorithms
12
0
45 people solved
Jul 29, 2025
Amazon logo
Amazon
Medium
Software Engineer

Minimize cost & recommend movies

Question Given arrays size[] and cost[] where size[i] is the size of the i-th product and cost[i] is the cost to increase size[i] by one unit, compute...

Coding & Algorithms
18
0
63 people solved
Jul 29, 2025
Amazon logo
Amazon
Medium
Software Engineer

Compute minimum passes over permutation

Question You are given an array shelf representing a permutation of the integers 1..n. Starting with target = 1, you repeatedly scan the array left-to...

Coding & Algorithms
66
0
139 people solved
Jul 29, 2025
Amazon logo
Amazon
Medium
Machine Learning Engineer

Implement inventory allocation with backorders

Implement inventory allocation with backorders Design and implement a function to process an event stream for an e-commerce marketplace. Input: ( 1) i...

Coding & Algorithms
1
0
28 people solved
Jul 17, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find first unique character

Find first unique character Given a lowercase/uppercase alphanumeric string s, return the index of the first character that appears exactly once; if n...

Coding & Algorithms
3
0
32 people solved
Jul 15, 2025
Amazon logo
Amazon
Medium
Software EngineerIntern

Find Most Frequent Values

Given an integer array nums and an integer k, return the k distinct values that occur most frequently in nums. The result may be returned in any order...

Coding & Algorithms
1
0
14 people solved
Mar 18, 2025
Amazon logo
Amazon
Hard
Software Engineer

Find Two-Word Compound Words

Given a list of unique lowercase words, return every word that can be formed by concatenating exactly two other words from the same list. For each com...

Coding & Algorithms
1
0
18 people solved
Jul 5, 2026
Amazon logo
Amazon
Easy
Software Engineer

Implement Regular Expression Matching

Implement Regular Expression Matching Determine whether an entire input string matches a pattern containing lowercase letters and two special symbols:...

Coding & Algorithms
1
0
16 people solved
Jul 4, 2026
Amazon logo
Amazon
Easy
Software Engineer

Unify Stock-Trading Profit Variants

Unify Stock-Trading Profit Variants Given daily stock prices, return the maximum profit when you may complete at most max_transactions buy-then-sell t...

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

Leaf Domain Cumulative Scores

This question evaluates a candidate's ability to model hierarchical string data and aggregate values along a tree structure, a common pattern in codin...

Coding & Algorithms
1
0
11 people solved
Jun 23, 2026
Amazon logo
Amazon
Medium
Machine Learning Engineer Locked

Implement Multi-Head Attention from Scratch in NumPy

This coding question tests a machine learning engineer's understanding of Transformer internals by requiring a from-scratch NumPy implementation of mu...

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

Caesar Cipher with Translation-Table Optimization

This question tests practical string manipulation and modular arithmetic by requiring implementation of a classic Caesar cipher with correct case-pres...

Coding & Algorithms
2
0
11 people solved
Jun 15, 2026
Amazon logo
Amazon
Medium
Machine Learning EngineerSenior+ Locked

Highest Average-Salary Team in an Org Chart

This question evaluates a candidate's ability to traverse tree-structured data and perform subtree aggregation, applying recursive or bottom-up DFS te...

Coding & Algorithms
0
0
4 people solved
Jun 14, 2026
Amazon logo
Amazon
Medium
Machine Learning EngineerSenior+ Locked

Merge Overlapping Time Ranges

This question evaluates a candidate's ability to work with interval merging, a core array and sorting problem in technical interviews. It tests unders...

Coding & Algorithms
0
0
5 people solved
Jun 14, 2026
Amazon logo
Amazon
Medium
Software Engineer Locked

Course Prerequisite Feasibility

This question tests graph theory fundamentals, specifically cycle detection in directed graphs as modeled by dependency constraints. It evaluates prac...

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

Inventory Allocation by Bid Priority

This question assesses simulation and priority-queue design skills, requiring careful implementation of tiered, round-robin resource allocation under ...

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

Find the Maximum Number of Concurrent Processes

Practice a Amazon coding interview problem focused on find the maximum number of concurrent processes. The prompt emphasizes edge cases, clean impleme...

Coding & Algorithms
0
0
7 people solved
Jun 4, 2026
Amazon logo
Amazon
Hard
Software Engineer Locked

Evaluate an Arithmetic Expression in Postfix Notation

Practice a Amazon coding interview problem focused on evaluate an arithmetic expression in postfix notation. The prompt emphasizes edge cases, clean i...

Coding & Algorithms
0
0
4 people solved
Jun 4, 2026
Amazon logo
Amazon
Hard
Software Engineer Locked

Find the Closest Version by Date

Practice a Amazon coding interview problem focused on find the closest version by date. The prompt emphasizes edge cases, clean implementation, and ve...

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