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
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