48 practice questions for Google Mobile Engineer interviews
Google mobile engineer interviews focus on iOS or Android platform knowledge, memory management, offline-first architecture, and mobile-specific system design.
Category: Array coding problem# Question Given a string where letters are sorted in alphabetical order, identify all letters that appear more than twice and record their first and...Input: Array Output: Computed result
codingMediumVerified Question#2
2. GPS Error Tracking
Category: Algorithm coding problem# Question You are tracking GPS location errors by comparing measured GPS locations against a set of "golden" (reference) locations. Each location...Input: List Output: Computed result
codingHardVerified Question#3
3. Minimum Boxing Area
Category: Binary search coding problem# Question Design a data structure to maintain a dynamic set of points on a 2D coordinate plane. Support operations to insert points, remove points,...Input: List Output: Integer
codingMediumVerified Question#4
4. Reverse Segment of Linked List
Category: Linked list coding problem# Question Given a singly linked list, reverse the second half of the list and then interleave the nodes from the first half and the reversed second...Input: Linked list Output: Computed result
codingMediumVerified Question#5
5. Unpainted Segments
Category: Binary search coding problem# Question You are given a range [A, B] and a sequence of painting operations. For each operation [L, R], calculate the total length of unpainted...Input: Array of intervals Output: Computed result
codingMediumVerified Question#6
6. Running Tests With Failing Pairs
Category: Algorithm coding problem# Question You are given a set of test cases and a black-box function runTests() that accepts a subset of these test cases and returns whether...Input: List Output: Integer
codingMediumVerified Question#7
7. Connected Crop Allocation
Category: Grid/matrix coding problem# Question You are given an M x N garden grid and a list of crops, each requiring a specific number of plots. The total number of plots required by...Input: 2D grid Output: Computed result
codingMediumVerified Question#8
8. [CodeSignal] Maximum Zero-Sum Triplets
Category: Array coding problem# Question You are given an array A of integers. A triplet is a sequence of three consecutive elements. A triplet is called zero-sum if the...Input: Array Output: Computed result
codingEasyVerified Question#9
9. [CodeSignal] Coin Table Game
Category: String coding problem# Question A player is playing a game in which coins are placed on and removed from a table. The game consists of multiple rounds. At the beginning...Input: String Output: Computed result
codingMediumVerified Question#10
10. Longest Match Tokenizer
Category: Array coding problemYou are given a text string text and a dictionary array where each element is in the format "<key>:<id>". Here key is a token string and id...Input: Array Output: Computed result
codingHardVerified Question#11
11. Dual Extremes Queue
Category: Queue-based coding problemDesign a StreamBuffer class that buffers a stream of integer latency samples in FIFO order and supports O(1) access to both the minimum and maximum...Input: Integer(s) Output: Integer
codingMediumVerified Question#12
12. Daily Branch Pruning
Category: Tree coding problemA file system manages a directory tree. Each day, all leaf directories (those with no child directories) are simultaneously removed. Directories that...Input: Array Output: Array
codingMediumVerified Question#13
13. Path Router
Category: Algorithm coding problem# Question Design a PathRouter class that maps URL-like path patterns to handler names. Patterns may contain wildcard segments (*) that match any...Input: Number(s) Output: Computed result
codingMediumVerified Question#14
14. Frequency Merge Tree
Category: Tree coding problem# Question Given a string, build a Frequency Merge Tree as follows: 1. Count the frequency of each character in the string. 2. Create a leaf node...Input: String Output: Computed result
codingHardVerified Question#15
15. Expression Simplifier
Category: String coding problemGiven an algebraic expression string containing single lowercase-letter variables, the operators + and -, and parentheses ( and ), simplify...Input: String Output: Computed result
codingMediumVerified Question#16
16. Largest Island Perimeter
Category: Grid/matrix coding problemYou are given an m x n binary grid where each cell is either '1' (land) or '0' (water). A group of connected land cells (connected horizontally...Input: 2D grid Output: Computed result
codingHardVerified Question#17
17. Interval Coverage Counter
Category: Interval-based coding problemGiven a list of closed intervals on the integer number line, build a data structure that efficiently answers point-coverage queries. A closed...Input: List Output: Computed result
codingHardsliding window#1
1. [OA] Sliding Window — Optimize battery usage in Google Maps location tracking
In mobile applications like Google Maps, efficient battery usage during location tracking is crucial for user satisfaction. You are tasked with implementing a function to calculate the maximum number of distinct locations that can be visited during a given time frame without exceeding the battery limit.Function Signature: - def max_distinct_locations(locations: List[int], time_limit: int, battery_limit: int) -> int: — returns the maximum distinct locations that can be visited.Example 1: Input: locations = [1, 2, 1, 3, 2] time_limit = 5 battery_limit = 3 Output: 3 Explanation: The optimal path within the limits can be 1, 2, 3 or 2, 1, 3.Example 2: Input: locations = [2, 3, 3, 4, 4, 1] time_limit = 5 battery_limit = 2 Output: 4 Explanation: The path can achieve locations 2, 3, 4, 1 while respecting the constraints.Constraints: - 0 <= locations.length <= 10000 - 0 <= time_limit <= 1000 - 0 <= battery_limit <= 1000