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

Design a no-repeat top-frequency music player

Design and implement a music player that receives song lists from new users and returns songs to play in frequency order without repeating a song in t...

Coding & Algorithms
4
0
51 people solved
Mar 22, 2025
Amazon logo
Amazon
Hard
Software Engineer

Maximize total bandwidth of data channel pairs

You are optimizing how information flows through a network of processing nodes. There are n processing nodes. The bandwidth capability of the i-th nod...

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

Find minimum time for irrecoverable password

A password is a string s of length n. A virus attacks positions in a 1-indexed order given by a permutation attackOrder[1..n]. At second t (1 <= t <= ...

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

Maximize credits with limited skips

You are given n warehouses with inventories inventory[0..n-1], and two dispatch amounts: you dispatch dispatch1 units first each turn, then your co-wo...

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

Merge overlapping and adjacent ranges

Given an unsorted list of integer ranges represented as half-open intervals [start, end) with start < end, merge all overlapping or directly adjacent ...

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

Design a fixed-capacity circular queue

Design a fixed-capacity circular queue that supports enqueue(x), dequeue(), front(), rear(), isEmpty(), and isFull() operations in O( 1) time. Impleme...

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

Design faster delay-time computation

You are given an array of integers representing task priorities. Tasks execute from right to left. For each index i, define its delay time as j - i wh...

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

Implement a robust shell CLI

Implement a POSIX-compliant shell script invoked as ./script.sh <username> <path_of_file> that outputs a single line formatted as "<timestamp> <licens...

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

Compute reachability and minimal-time same-type scheduling

1) Given four integers a, b, c, d (1 <= a, b, c, d <= 1000), you may perform the following operations any number of times and in any order: (a, b) -> ...

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

Place items into earliest fitting bins

Place items into earliest fitting bins You are given k items with sizes items[0..k-1] and n bins with initial capacities caps[0..n-1]. Process items i...

Coding & Algorithms
2
1
30 people solved
Aug 10, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find LCA in a BST

Find LCA in a BST Given the root of a binary search tree and two keys p and q, return the value of their lowest common ancestor (the deepest node whos...

Coding & Algorithms
2
0
36 people solved
Aug 10, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find odd-frequency element with O(1) space

You're given an integer array where exactly one value appears an odd number of times and all other values appear an even number of times. Implement a ...

Coding & Algorithms
4
0
35 people solved
Aug 9, 2025
Amazon logo
Amazon
Medium
Software Engineer

Count expressions reaching a target sum

Count expressions reaching a target sum Given an array of non-negative integers nums and an integer target T, assign either a + or − sign to each numb...

Coding & Algorithms
1
0
37 people solved
Aug 8, 2025
Amazon logo
Amazon
Medium
Software Engineer

Compute optimal locker placement with obstacles

Compute optimal locker placement with obstacles Given house coordinates H = {(xi, yi)} and tree coordinates T = {(xj, yj)} on a 2D integer grid, choos...

Coding & Algorithms
4
0
31 people solved
Aug 7, 2025
Amazon logo
Amazon
Medium
Software Engineer

Design a streaming median structure

Design a streaming median structure Design a data structure for a number stream that supports: add(num: int) in O(log n) time and median() -> float in...

Coding & Algorithms
2
0
33 people solved
Aug 7, 2025
Amazon logo
Amazon
Medium
Software Engineer

Implement two array-cost minimization algorithms

Implement two array-cost minimization algorithms that appeared back-to-back in an AWS SDE online assessment. Each can be solved independently. Part 1 ...

Coding & Algorithms
4
0
36 people solved
Aug 7, 2025
Amazon logo
Amazon
Medium
Software Engineer

Determine reachability and optimize task scheduling

Question LeetCode 780. Reaching Points: Given four integers a, b, c, d (1 <= a, b, c, d <= 1000). Starting from (a, b) you may repeatedly apply either...

Coding & Algorithms
2
0
38 people solved
Aug 4, 2025
Amazon logo
Amazon
Medium
Software Engineer

Solve sliding-window and heap problems

Question Design an algorithm using a sliding window to compute the maximum sum of any contiguous subarray of length k; explain time- and space-complex...

Coding & Algorithms
28
0
101 people solved
Aug 4, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find concatenated words in list

Question LeetCode 472. Concatenated Words – Given an array of strings words, return all words that are concatenations of at least two shorter words al...

Coding & Algorithms
4
0
34 people solved
Aug 4, 2025
Amazon logo
Amazon
Medium
Data Scientist

Design Efficient Data Structure for Median Retrieval

Scenario Senior problem-solving round assessing algorithmic thinking under time pressure. Question Design a data structure that supports inserting int...

Coding & Algorithms
2
0
27 people solved
Aug 4, 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