Amazon logo

Amazon Frontend Engineer Coding Questions

40 practice questions for Amazon Frontend Engineer interviews

Amazon frontend engineer interviews emphasise JavaScript, DOM manipulation, CSS, accessibility, browser APIs, and UI component architecture.

All Roles Software Engineer Backend Engineer Frontend Engineer Full Stack Engineer Mobile Engineer Data Engineer Data Scientist ML Engineer DevOps Engineer DevOps Engineer Product Manager SRE Security Engineer Engineering Manager Data Analyst UX/UI Designer QA Engineer
coding Hard Verified Question #1

1. 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 Question #2

2. [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 Question #3

3. [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 Question #4

4. [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 Question #5

5. [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 Question #6

6. [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 Question #7

7. [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 Question #8

8. 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 Medium two pointers #1

1. [OA] Two Pointers — Optimize Amazon's Recommendation Algorithm

Amazon strives to provide relevant product recommendations based on user browsing history and preferences. Utilizing a two-pointer technique can efficiently pair and rank products for recommendations.
Given a sorted array of product ratings and a target value, find two indices such that their ratings add up to the target.
### Function Signature
python
find_product_pair(ratings: List[int], target: int) -> List[int]

### Example 1:
Input: ratings = [1, 2, 3, 4, 6], target = 6
Output: [1, 2]
Explanation: Ratings at indices 1 and 2 (i.e., 2 + 4) equal the target 6.
### Example 2:
Input: ratings = [2, 5, 9, 11], target = 11
Output: [0, 2]
### Constraints:
- 1 <= ratings.length <= 10^4
- -10^4 <= ratings[i] <= 10^4
- -10^4 <= target <= 10^4
coding Medium sliding window #2

2. [OA] Sliding Window — Manage Amazon Price Tracking Features

In the fast-paced e-commerce environment, Amazon needs an efficient way to track price changes over time for various products. This feature enhances user engagement and informs purchasing decisions.
Given an array of product prices, implement a function that returns the maximum price within any k day window.
### Function Signature
python
max_price_in_window(prices: List[int], k: int) -> List[int]

### Example 1:
Input: prices = [100, 200, 150, 300, 250], k = 3
Output: [200, 300, 300]
Explanation: The maximum prices for the windows are 200 (days 1-3), 300 (days 2-4), and 300 (days 3-5).
### Example 2:
Input: prices = [120, 130, 115, 125, 140, 155], k = 2
Output: [130, 130, 125, 140, 155]
### Constraints:
- 1 <= prices.length <= 10^5
- 1 <= prices[i] <= 10^6
- 1 <= k <= prices.length

Related Amazon Frontend Engineer interview prep

Start practicing Amazon questions

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

Get Started Free