Amazon logo

Amazon Mobile Engineer Interview 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
system design Senior api design #3

3. Design a Background Task Scheduler for Amazon's mobile app notifications.


Amazon's mobile app sends various types of notifications to users, such as promotions or order updates. The goal is to design a task scheduler that can queue, execute, and reschedule notifications based on user-defined preferences and system load.
Class: BackgroundTaskScheduler
- Method: scheduleTask(notification: Notification, time: int): void - schedules a notification for a specific time.
- Method: cancelTask(notificationId: string): void - cancels a scheduled notification.
- Method: executeTasks(): void - executes all due notifications in the queue.
- Method: getPendingTasks(): List<Notification> - retrieves all pending notifications.
Example 1:
Input: scheduleTask({id: '1', title: 'Sale Alert'}, 5)
Output: []
Explanation: Task is added to the schedule.
Example 2:
Input: executeTasks() at time 5.
Output: [{id: '1', title: 'Sale Alert'}]
Explanation: The scheduled notification is executed at the correct time.
Constraints:
- The scheduler should efficiently manage up to 10,000 notifications, maintaining O(log n) time complexity for scheduling and execution.
system design Senior api design #4

4. Design an Offline-first Sync Engine for Amazon's shopping cart feature.


As part of Amazon's mobile shopping experience, users expect to have their shopping cart synchronized across devices seamlessly, even when offline. The goal is to design an offline-first sync engine to ensure user interactions with the cart are preserved and updated in a conflict-free manner.
Class: OfflineFirstSyncEngine
- Method: addItem(item: Item): void - adds an item to the cart.
- Method: removeItem(itemId: string): void - removes an item from the cart.
- Method: syncChanges(): void - synchronizes local cart changes with the backend when online.
- Method: getCartItems(): List<Item> - retrieves current items in the cart.
Example 1:
Input: addItem({id: '1', name: 'Echo Dot'})
Output: []
Explanation: Item is added to local cart.
Example 2:
Input: syncChanges() when online.
Output: [{id: '1', name: 'Echo Dot'}]
Explanation: Local cart updated in the backend.
Constraints:
- The sync should be efficient, aiming for O(log n) time complexity per operation.
- Handle up to 10,000 items in the cart.

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