Amazon logo

Amazon Mobile Engineer Coding Questions

40 practice questions for Amazon Mobile Engineer interviews

Amazon mobile engineer interviews focus on iOS or Android platform knowledge, memory management, offline-first architecture, and mobile-specific system design.

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 Hard graph #1

1. [OA] Dijkstra's Algorithm — Optimize delivery route calculation for Amazon Prime shipping.


Amazon Prime needs to calculate the shortest delivery route between multiple distribution centers and customer locations, considering shipping times based on real-time traffic data represented in the form of a graph.
Given the number of nodes, a list of edges where each edge has a start node, an end node, and a weight (time cost), and a starting_node, implement a function that returns the shortest path to each node from the starting_node.
Input: int nodes, List[Tuple[int, int, int]] edges, int starting_node
Output: Dict[int, int] - mapping from node to shortest time cost.
Example 1:
Input: 5, [(0, 1, 10), (0, 2, 5), (1, 2, 2), (1, 3, 1), (2, 1, 3), (2, 3, 9), (2, 4, 2), (3, 4, 4)], starting_node = 0
Output: {0: 0, 1: 7, 2: 5, 3: 8, 4: 10}
Explanation: The shortest path from node 0 to all other nodes is calculated using Dijkstra's algorithm.
Example 2:
Input: 3, [(0, 1, 2), (0, 2, 1), (1, 2, 4)], starting_node = 0
Output: {0: 0, 1: 2, 2: 1}
Explanation: The shortest path from node 0 leads directly to nodes 1 and 2.
Constraints:
- 1 <= nodes <= 10^5
- 1 <= edges.length <= 2 * 10^5
- 0 <= edges[i][0], edges[i][1] < nodes
- 1 <= edges[i][2] <= 10^5
coding Hard sliding window #2

2. [OA] Sliding Window — Implement a message aggregator that limits in-app notifications during high traffic periods.


In order to improve user experience and prevent notification overload, Amazon needs a solution that efficiently aggregates notifications sent to users in a sliding time window.
Given a list of notifications represented as timestamps and a maximum allowed number of notifications within a defined time_window, implement a function to return the count of unique notifications that should be shown to users.
Input: List[int] notifications, int time_window
Output: int - the count of unique notifications to be displayed.
Example 1:
Input: [1, 2, 3, 4, 1, 2, 3], time_window = 5
Output: 4
Explanation: Notifications 1, 2, 3, 4 are shown within a 5-second window.
Example 2:
Input: [1, 1, 2, 2, 2, 3, 3], time_window = 3
Output: 3
Explanation: Notifications 1, 2, 3 are shown within a 3-second window.
Constraints:
- 1 <= notifications.length <= 10^5
- 0 <= notifications[i] <= 10^9
- 1 <= time_window <= 10^5

Related Amazon Mobile Engineer interview prep

Start practicing Amazon questions

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

Get Started Free