Amazon logo

Amazon Interview Questions

9 practice questions for Amazon technical interviews

coding Hard Verified

Binary Tree Cameras


Category: Binary tree coding problem
You are given the root of a binary tree. You need to install the minimum number of cameras on the tree nodes such that every node in the tree is...
Input: Binary tree
Output: Integer
coding Hard Verified

[CodeSignal] Warehouse Emergency Deliveries


Category: Array coding problem
Amazon has opened a new warehouse recently. There are no products in the warehouse currently. The warehouse is under inspection for n days. The...
Input: Array
Output: Integer
coding Hard Verified

[CodeSignal] Permutation Sorter


Category: Combinatorics coding problem
Amazon engineers are testing a new tool, the Permutation Sorter, built to reorder sequences using limited operations. Given a permutation of...
Input: Integer(s)
Output: Integer
coding Hard Verified

[CodeSignal] Maximum Product Rating


Category: Array coding problem
The engineers at Amazon are working on a new rating system for their products. For each product, an array customer_rating is maintained for the...
Input: Array
Output: Computed result
coding Medium Verified

[CodeSignal] Drone Hub Travel


Category: Array coding problem
Amazon is expanding its next-generation drone delivery network, consisting of m hubs arranged in a circular ring (Hub 1 is adjacent to Hub m)....
Input: Array
Output: Computed result
coding Medium Verified

[CodeSignal] Minimum Security Groups


Category: Array coding problem
A financial services company has requested AWS for a private deployment of its cloud network. There are n servers in the network where the security...
Input: Array
Output: Integer
coding Medium Verified

[CodeSignal] Maximum Secure Deliveries


Category: Array coding problem
You are given an array deliveryLogs of size n, where each element represents the number of parts delivered in the i-th log. You are also given...
Input: Array
Output: Integer
coding Medium Verified

Maximum Interval Overlap


Category: Interval-based coding problem
You are given a list of closed intervals on the number line, where each interval [start, end] includes both endpoints. Find the maximum number of...
Input: List
Output: Integer
coding Senior graph

[OA] Graph Traversal — Find all paths for Amazon's Delivery Network

Amazon needs an efficient way to manage delivery routes across its vast logistics network. This involves determining all potential paths between locations in the network.
Problem statement: Given a directed acyclic graph representing delivery routes between locations, return all possible paths from a starting location start to a destination location end. Each path must be returned in the order they are found.
- List<List<String>> allPaths(String[][] graph, String start, String end) - Returns a list of all paths from start to end.
Example 1:
Input: `graph = [[

Start practicing Amazon questions

Sign up for free to access walkthroughs, AI-generated questions, and more.

Get Started Free