Amazon Interview Questions and Guide
Leadership Principles are evaluated in every round. Prepare 2 stories per principle with concrete, quantified results.
The Amazon interview loop
- Online assessment
- Phone screen
- Loop: 4–5 rounds mixing coding, system design and Leadership Principles; one interviewer is a Bar Raiser
Amazon interview questions
- Design a URL Shortener
- Design Ticketmaster
- Design a Distributed Rate Limiter
- Design Uber
- Design Dropbox
- Design a Payment System
- Design a Notification System
- Design a Distributed Cache
- Design a Distributed Job Scheduler
- Design Search Autocomplete
- Design an Ad Click Aggregator
- Design an Online Auction
- Design Online Chess
- Design LeetCode
- Design an Online Bookstore
- Design Airbnb
- Design DoorDash (Food Delivery)
- Design Spotify
- Design a Flash Sale System
- Design Facebook Live Comments
- Design Strava
- Design a Price Tracker
- Design a Distributed File System
- Design a Real-Time Leaderboard
- Design Smart Grid Device Control
- Design a Content Delivery Network (CDN)
- Design a Distributed Key-Value Store
- Design Pastebin
- Longest Substring Without Repeating Characters
- Trapping Rain Water
- Container With Most Water
- 3Sum
- Maximum Subarray (Kadane's Algorithm)
- Product of Array Except Self
- Sort Colors (Dutch National Flag)
- Majority Element (Boyer–Moore Vote)
- Corporate Flight Bookings (Difference Array)
- Find the Duplicate Number
- Find All Anagrams in a String
- Longest Palindromic Substring
- Best Time to Buy and Sell Stock
- Valid Palindrome
- Valid Palindrome II
- Merge Sorted Array
- Move Zeroes
- Longest Common Prefix
- Rotate Image
- Spiral Matrix
- Next Permutation
- Set Matrix Zeroes
- Longest Repeating Character Replacement
- Max Consecutive Ones III
- Minimum Size Subarray Sum
- First Missing Positive
- Remove Duplicates from Sorted Array
- Squares of a Sorted Array
- Two Sum II - Input Array Is Sorted
- Zigzag Conversion
- 4Sum
- 3Sum Closest
- Fruit Into Baskets
- Permutation in String
- String Compression
- Reverse Words in a String
- Subarray Product Less Than K
- Game of Life
- Majority Element II
- Remove Element
- Merge Strings Alternately
- Maximum Average Subarray I
- Is Subsequence
- Reverse Vowels of a String
- Maximum Product of Three Numbers
- Remove Duplicates from Sorted Array II
- Spiral Matrix II
- Increasing Triplet Subsequence
- Frequency of the Most Frequent Element
- Maximum Points You Can Obtain from Cards
- Number of Substrings Containing All Three Characters
- Substring with Concatenation of All Words
- Rotate String
- Longest Substring with At Least K Repeating Characters
- Reverse Pairs
- Find Pivot Index
- Rearrange Array Elements by Sign
- Count Binary Substrings
- Can Make Arithmetic Progression From Sequence
- Find Missing and Repeated Values
- Find All Numbers Disappeared in an Array
- Valid Triangle Number
- Third Maximum Number
- Maximum Sum of Distinct Subarrays With Length K
- Maximum Number of Vowels in a Substring of Given Length
- Shortest Unsorted Continuous Subarray
- Longest Substring with At Most K Distinct Characters
- Longest Mountain in Array
- Sort an Array
- Toeplitz Matrix
- Range Sum Query - Immutable
- Range Sum Query 2D - Immutable
- Product of the Last K Numbers
- Subarray Sum Equals K
- Implement an LRU Cache
- Two Sum
- Group Anagrams
- Longest Consecutive Sequence
- Contains Nearby Duplicate
- Contiguous Array (Equal 0s and 1s)
- First Unique Character
- Valid Anagram
- Isomorphic Strings
- Valid Sudoku
- Continuous Subarray Sum
- Subarray Sums Divisible by K
- Happy Number
- Logger Rate Limiter
- Contains Duplicate
- Ransom Note
- Word Pattern
- Design HashMap
- Count Number of Nice Subarrays
- Binary Subarrays With Sum
- LFU Cache
- Intersection of Two Arrays
- Repeated DNA Sequences
- Group Shifted Strings
- Design Underground System
- Find All Duplicates in an Array
- Longest Palindrome
- Invalid Transactions
- Analyze User Website Visit Pattern
- Unique Number of Occurrences
- Subarrays with K Different Integers
- Brick Wall
- K-diff Pairs in an Array
- Max Number of K-Sum Pairs
- Jewels and Stones
- Find Common Characters
- Shortest Word Distance
- Shortest Word Distance II
- Sort Array by Increasing Frequency
- Reverse a Linked List
- Reverse a Sublist
- Detect a Cycle (Floyd's Algorithm)
- Find the Cycle Entry
- Middle of a Linked List
- Merge Two Sorted Lists
- Merge K Sorted Lists
- Remove the Nth Node From the End
- Reorder List
- Palindrome Linked List
- Add Two Numbers
- Swap Nodes in Pairs
- Rotate List
- Odd Even Linked List
- Remove Duplicates from Sorted List II
- Sort List
- Reverse Nodes in k-Group
- Remove Duplicates from Sorted List
- Remove Linked List Elements
- Partition List
- Delete the Middle Node of a Linked List
- Add Two Numbers II
- Insertion Sort List
- Next Greater Node In Linked List
- Swapping Nodes in a Linked List
- Maximum Twin Sum of a Linked List
- Design Linked List
- Merge Nodes in Between Zeros
- Merge In Between Linked Lists
- Remove Zero Sum Consecutive Nodes from Linked List
- Reverse Nodes in Even Length Groups
- Linked List Components
- Double a Number Represented as a Linked List
- Daily Temperatures
- Valid Parentheses
- Min Stack
- Evaluate Reverse Polish Notation
- Basic Calculator II
- Next Greater Element (Circular)
- Largest Rectangle in Histogram
- Online Stock Span
- Remove K Digits
- Minimum Remove to Make Valid Parentheses
- Decode String
- Asteroid Collision
- Simplify Path
- Basic Calculator
- Longest Valid Parentheses
- Sum of Subarray Minimums
- Next Greater Element I
- Final Prices With a Special Discount in a Shop
- Remove All Adjacent Duplicates in String
- Remove All Adjacent Duplicates in String II
- Implement Queue using Stacks
- Minimum Add to Make Parentheses Valid
- 132 Pattern
- Remove Duplicate Letters
- Maximal Rectangle
- Exclusive Time of Functions
- Car Fleet
- Buildings With an Ocean View
- Backspace String Compare
- Baseball Game
- Number of Visible People in a Queue
- Max Stack
- Design Browser History
- Sum of Subarray Ranges
- Maximum Width Ramp
- Remove Outermost Parentheses
- Maximum Nesting Depth of the Parentheses
- Design a Stack With Increment Operation
- Maximum Frequency Stack
- Score of Parentheses
- Using a Robot to Print the Lexicographically Smallest String
- Sliding Window Maximum
- Rotting Oranges (Multi-source BFS)
- Distance to Nearest Zero (01 Matrix)
- Binary Tree Level Order Traversal
- Open the Lock
- Number of Recent Calls
- Shortest Subarray With Sum at Least K
- Design Circular Queue
- Shortest Path in Binary Matrix
- Walls and Gates
- Longest Subarray With Absolute Diff ≤ Limit
- Bus Routes
- Moving Average from Data Stream
- Implement Stack using Queues
- First Unique Number
- Find the Winner of the Circular Game
- Jump Game VII
- Shortest Path in a Grid with Obstacles Elimination
- Number of Students Unable to Eat Lunch
- Time Needed to Buy Tickets
- Dota2 Senate
- Nearest Exit from Entrance in Maze
- Snakes and Ladders
- The Maze
- Minimum Genetic Mutation
- Shortest Path to Get All Keys
- Continuous Subarrays
- Count Subarrays With Fixed Bounds
- Top K Frequent Elements
- Find Median from Data Stream
- Kth Largest Element in an Array
- K Closest Points to Origin
- Kth Largest Element in a Stream
- Task Scheduler
- Last Stone Weight
- IPO: Maximize Capital
- Single-Threaded CPU Scheduling
- Top K Frequent Words
- Sort Characters by Frequency
- Kth Smallest Element in a Sorted Matrix
- Furthest Building You Can Reach
- Maximum Number of Events That Can Be Attended
- Meeting Rooms III
- Minimum Number of Refueling Stops
- Smallest Range Covering Elements from K Lists
- Design Twitter
- Seat Reservation Manager
- Total Cost to Hire K Workers
- Process Tasks Using Servers
- Find K Pairs with Smallest Sums
- Ugly Number II
- Minimum Cost to Hire K Workers
- Maximum Performance of a Team
- Design A Leaderboard
- Exam Room
- K-th Smallest Prime Fraction
- Stock Price Fluctuation
- Design Task Manager
- Find Score of an Array After Marking All Elements
- Maximal Score After Applying K Operations
- Number of Orders in the Backlog
- Binary Search
- Search Insert Position (Lower Bound)
- First and Last Position in a Sorted Array
- Find Minimum in Rotated Sorted Array
- Capacity to Ship Packages Within D Days
- Split Array Largest Sum
- Median of Two Sorted Arrays
- Search a 2D Matrix
- Sqrt(x)
- Single Element in a Sorted Array
- Kth Missing Positive Number
- Find K Closest Elements
- Minimum Number of Days to Make m Bouquets
- Search a 2D Matrix II
- Peak Index in a Mountain Array
- Search in Rotated Sorted Array II
- Find the Smallest Divisor Given a Threshold
- Snapshot Array
- Valid Perfect Square
- Magnetic Force Between Two Balls
- H-Index II
- Find a Peak Element II
- Heaters
- Arranging Coins
- Maximum Candies Allocated to K Children
- Kth Smallest Number in Multiplication Table
- Find K-th Smallest Pair Distance
- Find Smallest Letter Greater Than Target
- Count Negative Numbers in a Sorted Matrix
- Successful Pairs of Spells and Potions
- Minimum Time to Complete Trips
- Minimized Maximum of Products Distributed to Any Store
- Minimum Speed to Arrive on Time
- Lowest Common Ancestor of a Binary Tree
- Binary Tree Right Side View
- Maximum Depth of a Binary Tree
- Invert a Binary Tree
- Balanced Binary Tree
- Diameter of a Binary Tree
- Path Sum II
- Binary Tree Maximum Path Sum
- Construct a Tree From Preorder and Inorder
- Binary Tree Inorder Traversal (Iterative)
- House Robber III (Tree DP)
- Same Tree
- Symmetric Tree
- Subtree of Another Tree
- Binary Tree Zigzag Level Order Traversal
- Binary Tree Vertical Order Traversal
- All Nodes Distance K in Binary Tree
- Sum Root to Leaf Numbers
- Path Sum III
- Maximum Width of Binary Tree
- Flatten Binary Tree to Linked List
- Amount of Time for Binary Tree to Be Infected
- Boundary of Binary Tree
- Step-By-Step Directions From a Binary Tree Node to Another
- Vertical Order Traversal of a Binary Tree
- Count Good Nodes in Binary Tree
- Find Leaves of Binary Tree
- Binary Tree Cameras
- Binary Tree Paths
- Minimum Depth of Binary Tree
- Path Sum
- Count Complete Tree Nodes
- Create Binary Tree From Descriptions
- Count Nodes Equal to Average of Subtree
- Cousins in Binary Tree
- Maximum Difference Between Node and Ancestor
- Longest ZigZag Path in a Binary Tree
- Binary Tree Preorder Traversal
- Sum of Left Leaves
- Merge Two Binary Trees
- Find Largest Value in Each Tree Row
- Check Completeness of a Binary Tree
- Construct Binary Tree from Inorder and Postorder Traversal
- Maximum Level Sum of a Binary Tree
- Binary Tree Tilt
- Search in a Binary Search Tree
- Validate a Binary Search Tree
- Kth Smallest Element in a BST
- Lowest Common Ancestor in a BST
- Insert Into a Binary Search Tree
- Delete a Node in a BST
- Range Sum of a BST
- Convert a Sorted Array to a Balanced BST
- Two Sum IV - Input is a BST
- Closest Binary Search Tree Value
- Trim a Binary Search Tree
- Inorder Successor in BST
- Recover Binary Search Tree
- Convert Sorted List to Binary Search Tree
- Convert BST to Greater Tree
- Minimum Absolute Difference in BST
- Closest Binary Search Tree Value II
- Balance a Binary Search Tree
- Unique Binary Search Trees
- Construct Binary Search Tree from Preorder Traversal
- Increasing Order Search Tree
- Find Mode in Binary Search Tree
- All Elements in Two Binary Search Trees
- Largest BST Subtree
- Count of Smaller Numbers After Self
- Two Sum BSTs
- Verify Preorder Sequence in Binary Search Tree
- Maximum Sum BST in Binary Tree
- Closest Nodes Queries in a Binary Search Tree
- Contains Duplicate III
- Number of Islands
- Course Schedule (Ordering)
- Network Delay Time
- Number of Provinces (Connected Components)
- Redundant Connection
- Graph Valid Tree
- Word Ladder
- Cheapest Flights Within K Stops (Bellman–Ford)
- Min Cost to Connect All Points (MST)
- Path With Minimum Effort (Dijkstra)
- Pacific Atlantic Water Flow
- Course Schedule II
- Max Area of Island
- Flood Fill
- Surrounded Regions
- Number of Connected Components in an Undirected Graph
- Making A Large Island
- Reconstruct Itinerary
- Alien Dictionary
- Keys and Rooms
- Find Eventual Safe States
- Possible Bipartition
- Swim in Rising Water
- The Earliest Moment When Everyone Become Friends
- Parallel Courses III
- Number of Islands II
- Minimum Height Trees
- Find if Path Exists in Graph
- Find the Celebrity
- All Paths From Source to Target
- Most Stones Removed with Same Row or Column
- Number of Distinct Islands
- Critical Connections in a Network
- Reorder Routes to Make All Paths Lead to the City Zero
- Number of Operations to Make Network Connected
- Island Perimeter
- Detonate the Maximum Bombs
- Find All Possible Recipes from Given Supplies
- Minimum Fuel Cost to Report to the Capital
- Detect Cycles in 2D Grid
- Find the Town Judge
- Minimize Malware Spread
- Count Unreachable Pairs of Nodes in an Undirected Graph
- Coin Change
- Word Break
- Edit Distance
- Climbing Stairs
- House Robber
- Unique Paths
- Minimum Path Sum
- Longest Common Subsequence
- Longest Palindromic Subsequence
- 0/1 Knapsack
- Coin Change II (Unbounded Knapsack)
- Partition Equal Subset Sum
- Target Sum
- Matrix Chain Multiplication
- Palindrome Partitioning II (Min Cuts)
- Best Time to Buy and Sell Stock With Cooldown
- Best Time to Buy and Sell Stock IV (k Transactions)
- Maximum Product Subarray
- Palindromic Substrings
- House Robber II
- Unique Paths II
- Maximal Square
- Interleaving String
- Regular Expression Matching
- Maximum Profit in Job Scheduling
- Longest Increasing Path in a Matrix
- Min Cost Climbing Stairs
- Pascal's Triangle
- Triangle
- Perfect Squares
- Minimum Cost For Tickets
- Predict the Winner
- Maximum Sum Circular Subarray
- Wildcard Matching
- Distinct Subsequences
- Russian Doll Envelopes
- Best Time to Buy and Sell Stock III
- Combination Sum IV
- Number of Longest Increasing Subsequence
- Minimum Falling Path Sum
- Dungeon Game
- Frog Jump
- Delete and Earn
- Integer Break
- Partition Array for Maximum Sum
- Minimum Difficulty of a Job Schedule
- Minimum Cost to Cut a Stick
- Fibonacci Number
- Count Square Submatrices with All Ones
- Domino and Tromino Tiling
- Cherry Pickup
- Longest String Chain
- Number of Ways to Form a Target String Given a Dictionary
- Painting the Walls
- New 21 Game
- Stone Game III
- Maximum Sum of 3 Non-Overlapping Subarrays
- Permutations
- Combinations
- Combination Sum
- N-Queens
- Word Search
- Generate Parentheses
- Letter Combinations of a Phone Number
- Subsets II
- Combination Sum II
- Permutations II
- Palindrome Partitioning
- Restore IP Addresses
- Word Break II
- Expression Add Operators
- Subsets
- Combination Sum III
- Letter Case Permutation
- Matchsticks to Square
- Remove Invalid Parentheses
- Word Ladder II
- Beautiful Arrangement
- Path with Maximum Gold
- Maximum Length of a Concatenated String with Unique Characters
- Generalized Abbreviation
- Factor Combinations
- Optimal Account Balancing
- Unique Paths III
- N-Queens II
- Different Ways to Add Parentheses
- The k-th Lexicographical String of All Happy Strings of Length n
- Shopping Offers
- Jump Game
- Jump Game II (Minimum Jumps)
- Gas Station
- Partition Labels
- Fractional Knapsack
- Minimum Cost to Connect Sticks (Huffman)
- Candy
- Best Time to Buy and Sell Stock II
- Can Place Flowers
- Valid Parenthesis String
- Largest Number
- Boats to Save People
- Hand of Straights
- Maximum Swap
- Lemonade Change
- Assign Cookies
- Two City Scheduling
- Queue Reconstruction by Height
- Minimum Deletions to Make Character Frequencies Unique
- Maximum Units on a Truck
- Maximize Distance to Closest Person
- Reduce Array Size to The Half
- Wiggle Subsequence
- Bag of Tokens
- Minimum Number of Taps to Open to Water a Garden
- Broken Calculator
- Minimum Initial Energy to Finish Tasks
- Maximum Ice Cream Bars
- Maximum Element After Decreasing and Rearranging
- Minimum Number of Increments on Subarrays to Form a Target Array
- Move Pieces to Obtain a String
- Partitioning Into Minimum Number Of Deci-Binary Numbers
- Minimum Meeting Rooms
- Insert Interval
- Meeting Rooms
- Non-overlapping Intervals
- Minimum Arrows to Burst Balloons
- Car Pooling (Sweep Line)
- My Calendar I
- Summary Ranges
- Remove Covered Intervals
- My Calendar II
- Data Stream as Disjoint Intervals
- Minimum Interval to Include Each Query
- My Calendar III
- Video Stitching
- Missing Ranges
- Meeting Scheduler
- Count Days Without Meetings
- Range Module
- Divide Intervals Into Minimum Number of Groups
- Find Right Interval
- Minimum Time Difference
- The Skyline Problem
- Brightest Position on Street
- Remove Interval
- Points That Intersect With Cars
- Word Search II
- Implement a Trie (Prefix Tree)
- Design Add and Search Words (Wildcards)
- Search Suggestions (Autocomplete)
- Maximum XOR of Two Numbers
- Replace Words
- Longest Word in Dictionary
- Map Sum Pairs
- Design Search Autocomplete System
- Concatenated Words
- Stream of Characters
- Palindrome Pairs
- Prefix and Suffix Search
- Implement Magic Dictionary
- Short Encoding of Words
- Sum of Prefix Scores of Strings
- Find the Length of the Longest Common Prefix
- Lexicographical Numbers
- Remove Sub-Folders from the Filesystem
- Words Within Two Edits of Dictionary
- Index Pairs of a String
- Count Prefix and Suffix Pairs
- Single Number (XOR)
- Counting Bits
- Power of Two
- Missing Number
- Set Mismatch (Duplicate and Missing)
- Partition to K Equal Sum Subsets (Bitmask DP)
- Add Binary
- Hamming Distance
- Single Number II
- Single Number III
- Bitwise AND of Numbers Range
- Find the Difference
- Minimum Flips to Make a OR b Equal to c
- Gray Code
- Maximum Product of Word Lengths
- Divide Two Integers
- UTF-8 Validation
- Reverse Bits
- Number Complement
- Binary Watch
- Minimum Bit Flips to Convert Number
- Concatenation of Consecutive Binary Numbers
- Bitwise ORs of Subarrays
- Binary Gap
- Find Kth Bit in Nth Binary String
- XOR Queries of a Subarray
- Number of Steps to Reduce a Number to Zero
- Find The Original Array of Prefix Xor
- Prime Check
- Count Primes (Sieve of Eratosthenes)
- Greatest Common Divisor of Strings
- Binomial Coefficient nCr mod 10⁹+7
- Permutation Sequence (k-th Permutation)
- Nth Magical Number (LCM + Binary Search)
- Palindrome Number
- Reverse Integer
- Roman to Integer
- Integer to Roman
- String to Integer (atoi)
- Multiply Strings
- Excel Sheet Column Title
- Fraction to Recurring Decimal
- Integer to English Words
- Angle Between Hands of a Clock
- Plus One
- Add Strings
- Fizz Buzz
- Count and Say
- Bulb Switcher
- Valid Number
- Max Points on a Line
- Robot Bounded In Circle
- Sequential Digits
- Power of Three
- Ugly Number
- Add Digits
- Perfect Number
- Sum of Square Numbers
- Rotate Function
- Count Good Numbers
- Number of Digit One
- Compare Version Numbers
- Excel Sheet Column Number
- Nth Digit
- Factorial Trailing Zeroes
- Water and Jug Problem
- Nim Game
- The kth Factor of n
- Count Numbers with Unique Digits
- Rectangle Area
- Base 7
- Find the Closest Palindrome
- Design a Parking Lot
- Design an Elevator System
- Design a Vending Machine
- Design Snakes and Ladders
- Design the Snake Game
- Design Connect Four
- Design a Chess Game
- Design a Deck of Cards for Blackjack
- Design Tic-Tac-Toe
- Design Amazon Locker
- Design Splitwise
- Design an ATM
- Design a Library Management System
- Design a Discount and Coupon Engine
- Design a Movie Ticket Booking System
- Design a Music Player
- Design a Q&A Site like Stack Overflow
- Design an Online Auction
- Design a Car Rental Booking System
- Design a Logging Framework
- Design a File Search Tool (Unix find)
- Design a Circuit Breaker
- Design a Notification Service
- Design a Cache with Pluggable Eviction
- Design an In-Memory File System
- Tell me about yourself
- Tell me about a conflict with a coworker
- Tell me about a time you disagreed with your manager
- Tell me about a time you failed
- Tell me about a time you worked with ambiguity
- Tell me about a time you had to meet a tight deadline
- Why are you leaving your current role?
- Where do you see yourself in five years?
- Tell me about a time you took ownership beyond your role
- Tell me about a problem you noticed that nobody else was addressing
- Tell me about working with a difficult stakeholder
- Tell me about delivering a project across multiple teams
- Tell me about a time you led without formal authority
- Tell me about working with an underperforming teammate
- Tell me about a decision you made with incomplete information
- Tell me about a time you had to change direction mid-project
- How do you prioritize competing demands?
- Tell me about a mistake that affected others
- What is a weakness you're working on?
- Tell me about a production incident you handled
- Tell me about a time you had to learn something new quickly
- Tell me about a time you pushed back on a request
- What questions do you have for me?
- Tell me about a time you went above and beyond for a customer
- Tell me about a time you dove deep to find the root cause
- Tell me about a time you took a calculated risk
- Tell me about a time you simplified something complex
- Tell me about a time you refused to compromise on quality
- Tell me about a time you did more with less
- Tell me about a time you had to earn the trust of a skeptical team
- Tell me about a time you proposed a bold vision
- Tell me about a time you delivered despite a major setback
- Tell me about a judgment call where others disagreed with you
- Tell me about something you learned outside your job that made you better at it
- Tell me about raising the bar when hiring or developing people
- Tell me about a time you challenged a more senior colleague