45 practice questions for Microsoft Mobile Engineer interviews
Microsoft mobile engineer interviews focus on iOS or Android platform knowledge, memory management, offline-first architecture, and mobile-specific system design.
Category: Sliding window coding problem# Design Rate Limiter Design a rate limiter system that controls the number of requests allowed within a specified time window. The rate limiter is...Input: String Output: Computed result
Category: Trie-based coding problemInput: String Output: Computed result
codingMediumVerified Question#3
3. Object Oriented Design - Notification Service
Category: Trie-based coding problem# Problem Statement Design a notification service that supports sending notifications through multiple channels (SMS, Email) and is architected to...Input: Number(s) Output: Computed result
codingMediumVerified Question#4
4. Shortest Substring with N Unique Characters
Category: String coding problem# Shortest Substring with N Unique Characters *This is a variation of the leetcode problem* Given a string s and an integer n, find the length of...Input: String Output: Computed result
codingHardVerified Question#5
5. Rate Limiter
Category: Sliding window coding problemDesign a rate limiter that tracks API requests per client and enforces limits using a sliding time window. Your system must support: - hit(key,...Input: Given input Output:** Computed result
codingHardVerified Question#6
6. Non-Adjacent Team Selection
Category: Tree coding problem# Question You are given n people labeled from 0 to n - 1. Some pairs of people know each other directly. These relationships are given as a...Input: List Output: Computed result
codingMediumVerified Question#7
7. Bounded Repeat Substring
Category: String coding problemA sensor data stream is represented as a string of characters. A contiguous segment of the stream is considered valid if it contains no three...Input: String Output: Computed result
codingMediumVerified Question#8
8. OA [CodeSignal] Prime Jumps
Category: Algorithm coding problem# OA [CodeSignal] Prime Jumps A game is played with the following rules: - A player starts at cell 0 with a score of 0. - There is a row of n cells...Input: Number(s) Output: Computed result
codingHardVerified Question#9
9. Combine N-ary Trees
Category: Tree coding problemYou 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
codingMediumVerified Question#10
10. Digit Replacement Maximizer
Category: String coding problemA 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
codingMediumVerified Question#11
11. Best Window For Target Count
Category: Trie-based coding problemA log analysis tool searches for the most frequent occurrence of a specific error code within a fixed-size window of log entries. Given an integer...Input: Array Output: Integer
codingMediumVerified Question#12
12. Evens Before Odds
Category: Array coding problemYou are given an integer array nums. Rearrange nums so that all even numbers appear before all odd numbers. The relative order of even or odd...Input: Array Output: Integer
system designHardVerified Question#13
13. Top 5 System Design Questions Jan 2026
Category: Interval-based system design problem# Top 5 Recently Asked System Design Questions - Microsoft These are the commonly asked system design questions from Microsoft interviews and some...Input: List Output: Computed result
codingHardcaching#1
1. [OA] LRU Cache — Implement the caching layer used by Microsoft Teams for API responses
In Microsoft Teams, quick access to frequently used API responses is critical for a smooth user experience. Implement an LRU Cache to store API responses efficiently.Function Signature: python def __init__(self, capacity: int) -> None: def get(self, key: int) -> int: def put(self, key: int, value: int) -> None: Example 1: Input: cache = LRUCache(2), cache.put(1, 1), cache.put(2, 2) Output: cache.get(1) Explanation: Returns 1, indicating that the key 1 was found.Example 2: Input: cache.put(3, 3) Output: cache.get(2) Explanation: Returns -1, indicating that the key 2 was removed from the cache.Constraints: - 1 <= capacity <= 3000 - 0 <= key <= 10^4 - 0 <= value <= 10^4
codingHardsliding window#2
2. [OA] Sliding Window — Optimize battery usage in Microsoft's mobile app by reducing background tasks
Microsoft's mobile applications require efficient background task management to optimize battery usage while maintaining performance. Implement a function that uses a sliding window approach to calculate the maximum number of tasks that can run concurrently without exceeding the device's battery capacity.Function Signature: python def max_concurrent_tasks(battery_capacity: int, tasks: List[int]) -> int: Example 1: Input: battery_capacity = 10, tasks = [2, 1, 3, 1, 2] Output: 3 Explanation: The maximum tasks that can run concurrently with total battery consumption within capacity is 3 (tasks [2, 1, 1]).Example 2: Input: battery_capacity = 5, tasks = [2, 4, 3, 1] Output: 1 Explanation: The maximum tasks that can run concurrently is 1 (task [1]).Constraints: - 1 <= battery_capacity <= 100 - 1 <= tasks.length <= 1000 - 1 <= tasks[i] <= 10
system designSeniorapi design#3
3. [OA] Design a Background Task Scheduler for Microsoft To-Do
To help users manage their tasks in Microsoft To-Do, you need to design a background task scheduler that handles task reminders efficiently, even when the app is not active. Implement a class that schedules tasks to send notifications based on user-configured times.Class Signature: python class TaskScheduler: def __init__(self): def schedule_task(self, task: Task, time: str) -> None: def execute_tasks(self) -> None: Example 1: Input: task_scheduler = TaskScheduler(), task_scheduler.schedule_task(task, '2023-12-01T10:00:00') Output: None Explanation: The task will be scheduled to remind the user at the specified time.Example 2: Input: task_scheduler.execute_tasks() Output: ['Task Reminder'] Explanation: Notifies the user about scheduled tasks due to be reminded.Constraints: - 1 <= tasks.count <= 100 - 1 <= task.title.length <= 100
system designSeniorapi design#4
4. [OA] Design an Offline-first Sync Engine for Microsoft OneNote
As OneNote is often used in offline scenarios, designing a sync engine that efficiently reconciles data between local storage and the server is crucial. Design a class that can sync notes created offline with a remote database when a user's internet connection is restored.Class Signature: python class SyncEngine: def __init__(self, local_db: Database, remote_db: Database): def create_note(self, note: Note) -> None: def sync(self) -> None: Example 1: Input: sync_engine = SyncEngine(local_db, remote_db), sync_engine.create_note(note) Output: None Explanation: A note is created offline, awaiting sync.Example 2: Input: sync_engine.sync() Output: True Explanation: All offline notes are successfully synced to the remote database.Constraints: - 1 <= notes.count <= 1000 - 1 <= note.content.length <= 10^4