LinkedIn logo

LinkedIn Mobile Engineer Coding Questions

43 practice questions for LinkedIn Mobile Engineer interviews

LinkedIn 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 Easy Verified Question #1

1. Balanced Parentheses


Category: String coding problem
Configuration files at LinkedIn are written in JSON, YAML, and HOCON formats. Malformed config files can bring down multiple services, so validators...
Input: String
Output: Printed output
coding Medium Verified Question #2

2. Words From Phone Number


Category: String coding problem
A standard phone keypad maps digits to letters as follows: ` 2 -> a, b, c 3 -> d, e, f 4 -> g, h, i 5 -> j, k, l 6 -> m, n, o 7 -> p, q, r, s 8 ->...
Input: List
Output: Array
coding Medium Verified Question #3

3. Circular Signal Window


Category: Array coding problem
You are given a circular array signal of 0s and 1s representing antenna readings logged in sequence, where 1 means good signal and 0 means...
Input: Array
Output: Integer
coding Easy Verified Question #4

4. Active Sprint Filter


Category: Graph coding problem
A project tracking system logs team activity throughout the workday. Each log entry has the format "teamId action timestamp", where action is...
Input: Graph (nodes and edges)
Output: Printed output
coding Medium Verified Question #5

5. Dependency Task Executor


Category: Graph coding problem
A build system manages pipeline steps where each step may depend on other steps completing first. Implement the BuildPipeline class:...
Input: Graph (nodes and edges)
Output: Computed result
coding Medium Verified Question #6

6. Daily Branch Pruning


Category: Tree coding problem
A 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
coding Hard Verified Question #7

7. [OA] Minimum Weight Ceiling Path


Category: Graph coding problem
A network topology connects n servers labeled 1 to n. Each connection is a bidirectional link with a bandwidth cost. A network engineer needs...
Input: Graph (nodes and edges)
Output: Integer
coding Hard Verified Question #8

8. Priority Cache System


Category: String coding problem
A CDN (Content Delivery Network) maintains a fixed-capacity cache of web content. Each content item has an associated priority score. When the cache...
Input: String
Output: Integer
coding Medium Verified Question #9

9. Distribution Center Placement


Category: Array coding problem
A logistics company is expanding its distribution network along a single highway. You are given an array of integers locations representing the...
Input: Array of integers
Output: Computed result
coding Medium Verified Question #10

10. Manual String Substitution


Category: String coding problem
A template engine needs to substitute all occurrences of a pattern in a template string with a replacement string, without using any built-in...
Input: String
Output: Printed output
coding Hard Verified Question #11

11. Combine N-ary Trees


Category: Tree coding problem
You are given the roots of two N-ary organization charts, each representing a hierarchical department structure. Every node has an integer...
Input: List
Output: Computed result
coding Medium Verified Question #12

12. Closest Value Pair


Category: Array coding problem
An inventory system has two sorted product catalogs A and B. Each value in the catalog represents a product size. Find a pair [a, b] where a...
Input: Array
Output: Computed result
coding Medium Verified Question #13

13. Digit Replacement Maximizer


Category: String coding problem
A numeric optimization system performs exactly k substitution operations on a number string s. In each operation, choose any digit in s that is...
Input: String
Output: Computed result
coding Hard caching #1

1. [OA] LRU Cache — Implement a memory-efficient caching layer for LinkedIn's API responses

LinkedIn's mobile platform requires efficient caching to enhance its API responses speed and reduce load on servers. Create an LRU (Least Recently Used) cache that resolves HTTP requests.
- Function Signature: def LRUCache(capacity: int) -> None: - Initialize LRU cache system.
- Method 1: def get(key: str) -> Union[int, None]: - Return the value of the key if present, else return None.
- Method 2: def put(key: str, value: int) -> None: - Update or add the value if the key is not already present. If the cache reaches its capacity, it should invalidate the least recently used item.
Example 1:
Input: cache = LRUCache(2)
cache.put(1,1)
cache.put(2,2)
cache.get(1)
Output: 1
Explanation: Returns the value for key 1.
Example 2:
Input: cache.put(3,3)
cache.get(2)
Output: None
Explanation: Returns None since key 2 was evicted to make space.
Constraints:
- 1 <= capacity <= 1000
- 0 <= key <= 10^5
- 0 <= value <= 10^5
coding Hard sliding window #2

2. [OA] Sliding Window — Implement an offline message sync mechanism for LinkedIn mobile accounts

LinkedIn users need to manage their messages even in low connectivity scenarios. Your job is to efficiently synchronize a user's messages when the connection is restored.
Given a list of messages, each with an associated timestamp, and a window_size, implement a function to retrieve messages that fall within that time window.
- Function Signature: def sync_messages(messages: List[Tuple[str, int]], window_size: int) -> List[str]: - Return a list of messages within the timeframe of window_size.
Example 1:
Input: messages = [('msg1', 1), ('msg2', 2), ('msg3', 5)], window_size = 3
Output: ['msg2', 'msg3']
Explanation: msg2 and msg3 are within a 3 second window of the last message.
Example 2:
Input: messages = [('msg1', 1), ('msg2', 10), ('msg3', 15)], window_size = 5
Output: []
Explanation: No messages fall within the 5 seconds range.
Constraints:
- 1 <= len(messages) <= 10^6
- 0 <= timestamp <= 10^9

Related LinkedIn Mobile Engineer interview prep

Start practicing LinkedIn questions

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

Get Started Free