Microsoft Interview Prep (SDE / SDE 2 / Senior)
Microsoft’s loop is the most candidate-friendly of the big five in tone. The design round is collaborative rather than adversarial — the interviewer often acts as a partner helping you refine the design rather than hunting for gaps.
That friendliness does not extend to the hiring manager round, which is the one people underestimate. It can single-handedly reject you. The coding bar sits at solid LeetCode medium; clean code and clear communication beat exotic algorithms here.
Interview Process
| Stage | Duration | Focus |
|---|---|---|
| Recruiter Screen | 30 min | Background, team match |
| Online Assessment (campus) | 60-90 min | 2-3 coding problems |
| Phone / Technical Screen | 45-60 min | 1-2 DSA problems, medium |
| Onsite Round 1 | 60 min | Coding + fundamentals |
| Onsite Round 2 | 60 min | Coding, often with design flavour |
| Onsite: System Design | 60 min | SDE 2 and above |
| Hiring Manager (As Appropriate) | 45-60 min | Past work, ownership, team fit |
The “as appropriate” round with a senior leader is a real gate, not a formality. Teams hire independently at Microsoft, so a rejection from one team does not close the door at another — and team match matters more here than at Google or Meta.
What Microsoft Actually Tests
Derived from 1384 reported Microsoft-tagged problems. Difficulty mix:
| Difficulty | Count | Share |
|---|---|---|
| Easy | 393 | 28% |
| Medium | 757 | 55% |
| Hard | 234 | 17% |
Hard problems are a real but minority share. Medium fluency wins most rounds; Hard shows up late in the loop.
Where those problems fall by pattern:
| Rank | Pattern | Problems | Share of list |
|---|---|---|---|
| 1 | Arrays & Hashing | 276 | 20% |
| 2 | Dynamic Programming | 193 | 14% |
| 3 | Trees | 124 | 9% |
| 4 | Sliding Window & Two Pointers | 119 | 9% |
| 5 | Strings | 103 | 7% |
| 6 | Graphs | 95 | 7% |
| 7 | Binary Search | 83 | 6% |
| 8 | Math & Bit Manipulation | 71 | 5% |
| 9 | Intervals, Greedy & Sorting | 70 | 5% |
| 10 | Heap / Priority Queue | 54 | 4% |
Microsoft Signature Problems
These rank high on Microsoft’s list but are reported by few other companies — the questions that are distinctively theirs rather than generic interview classics. The last column is how many of the 142 companies on this site report each one.
| # | Problem | Pattern | Difficulty | Also asked at | Link |
|---|---|---|---|---|---|
| 1 | Reverse Integer | Math | Medium | 19 of 142 | Solve → |
| 2 | Single Element in a Sorted Array | Binary Search | Medium | 18 of 142 | Solve → |
| 3 | Serialize and Deserialize Binary Tree | Binary Tree + Design | Hard | 21 of 142 | Solve → |
| 4 | Reverse Words in a String | Two Pointers | Medium | 24 of 142 | Solve → |
| 5 | Minimum Edge Reversals So Every Node Is Reachable | Graph + BFS | Hard | 10 of 142 | LeetCode → |
| 6 | Subsets | Backtracking + Bit Manipulation | Medium | 19 of 142 | Solve → |
| 7 | Binary Tree Level Order Traversal | Binary Tree + BFS | Medium | 14 of 142 | Solve → |
| 8 | Binary Tree Zigzag Level Order Traversal | Binary Tree + BFS | Medium | 18 of 142 | Solve → |
| 9 | Minimum Path Sum | DP | Medium | 14 of 142 | Solve → |
| 10 | Permutation in String | Sliding Window + Two Pointers | Medium | 15 of 142 | Solve → |
| 11 | Validate Binary Search Tree | BST + Binary Tree | Medium | 18 of 142 | Solve → |
| 12 | Integer to English Words | Recursion + Math | Hard | 20 of 142 | Solve → |
| 13 | Minimum Size Subarray Sum | Sliding Window + Prefix Sum | Medium | 16 of 142 | Solve → |
| 14 | Swap Nodes in Pairs | Linked List | Medium | 13 of 142 | Solve → |
If you are short on time, these carry more Microsoft-specific signal per hour than the universal top-100 lists.
Reported in the Last Six Months
The recency-filtered slice of Microsoft’s list, ranked by how often each was reported. Expect heavy overlap with the all-time classics — that overlap is the point, it means these stay in rotation.
| # | Problem | Pattern | Difficulty | Link |
|---|---|---|---|---|
| 1 | Two Sum | Hash Table + Array | Easy | Solve → |
| 2 | Longest Palindromic Substring | Manacher + Two Pointers | Medium | Solve → |
| 3 | Add Two Numbers | Linked List | Medium | Solve → |
| 4 | Longest Substring Without Repeating Characters | Sliding Window | Medium | Solve → |
| 5 | Trapping Rain Water | Monotonic Stack + Two Pointers | Hard | Solve → |
| 6 | 3Sum | Two Pointers | Medium | Solve → |
| 7 | Maximum Subarray | Divide and Conquer + DP | Medium | Solve → |
| 8 | LRU Cache | Doubly Linked List + Design | Medium | Solve → |
| 9 | Merge Intervals | Quicksort | Medium | Solve → |
| 10 | Number of Islands | Union-Find + BFS | Medium | Solve → |
| 11 | Subarray Sum Equals K | Prefix Sum | Medium | Solve → |
| 12 | Best Time to Buy and Sell Stock | DP | Easy | Solve → |
| 13 | Next Permutation | Two Pointers | Medium | Solve → |
| 14 | Container With Most Water | Greedy + Two Pointers | Medium | Solve → |
| 15 | Generate Parentheses | Bracket Sequences + Backtracking | Medium | Solve → |
System Design (HLD) Problems Asked at Microsoft
| # | Problem | Difficulty | Link |
|---|---|---|---|
| 1 | Chat System (Teams / WhatsApp) | Intermediate | Read → |
| 2 | Google Docs (Collaborative Editing) | Advanced | Read → |
| 3 | Dropbox / OneDrive (File Storage) | Advanced | Read → |
| 4 | URL Shortener | Beginner | Read → |
| 5 | Notification System | Intermediate | Read → |
| 6 | Rate Limiter | Beginner | Read → |
| 7 | Twitter Feed | Intermediate | Read → |
| 8 | Distributed Cache | Intermediate | Read → |
| 9 | Metrics and Monitoring System | Intermediate | Read → |
LLD / Machine Coding Problems Asked at Microsoft
Expect to produce working, readable code with clear class boundaries.
| # | Problem | Difficulty | Link |
|---|---|---|---|
| 1 | File System | Intermediate | Read → |
| 2 | Multilevel Cache | Intermediate | Read → |
| 3 | Parking Lot | Beginner | Read → |
| 4 | Tic Tac Toe | Beginner | Read → |
| 5 | Task Scheduler | Intermediate | Read → |
DSA Problems Asked at Microsoft
81 problems across 12 pattern groups. Each group is allocated in proportion to its real share of Microsoft’s tagged list, then filled with the highest-frequency problems in that group — so the weight here matches the distribution above rather than burying graph and tree work under the usual array classics.
Sliding Window & Two Pointers
Linear-time scans over arrays and strings. High volume, low variance — these should be automatic. Showing the top 14 of 19 on the list.
| # | Problem | Pattern | Difficulty | Link |
|---|---|---|---|---|
| 1 | Longest Substring Without Repeating Characters | Sliding Window | Medium | Solve → |
| 2 | 3Sum | Two Pointers | Medium | Solve → |
| 3 | Merge Sorted Array | Two Pointers | Easy | Solve → |
| 4 | Container With Most Water | Greedy + Two Pointers | Medium | Solve → |
| 5 | Remove Duplicates from Sorted Array | Two Pointers | Easy | Solve → |
| 6 | Next Permutation | Two Pointers | Medium | Solve → |
| 7 | Merge Strings Alternately | Two Pointers | Easy | Solve → |
| 8 | Move Zeroes | Two Pointers | Easy | Solve → |
| 9 | Sort Colors | Bubble Sort + Quicksort | Medium | Solve → |
| 10 | Rotate Array | Two Pointers | Medium | Solve → |
| 11 | Valid Palindrome | Two Pointers | Easy | Solve → |
| 12 | Reverse Words in a String | Two Pointers | Medium | Solve → |
| 13 | Remove Element | Two Pointers | Easy | Solve → |
| 14 | Happy Number | Floyd Cycle + Two Pointers | Easy | Solve → |
Arrays & Hashing
Prefix sums, counting, and grid walks. The warm-up round, and the one people get careless on. All 13 on the list.
| # | Problem | Pattern | Difficulty | Link |
|---|---|---|---|---|
| 15 | Two Sum | Hash Table + Array | Easy | Solve → |
| 16 | Subarray Sum Equals K | Prefix Sum | Medium | Solve → |
| 17 | Palindrome Number | Math | Easy | Solve → |
| 18 | Rotate Image | Matrix + Math | Medium | Solve → |
| 19 | Spiral Matrix | Simulation + Matrix | Medium | Solve → |
| 20 | Create Hello World Function | Implementation | Easy | LeetCode → |
| 21 | Product of Array Except Self | Prefix Sum | Medium | Solve → |
| 22 | Reverse Integer | Math | Medium | Solve → |
| 23 | Recyclable and Low Fat Products | Database | Easy | LeetCode → |
| 24 | Contains Duplicate | Sorting + Hash Table | Easy | Solve → |
| 25 | Rotting Oranges | BFS | Medium | Solve → |
| 26 | Set Matrix Zeroes | Matrix + Hash Table | Medium | Solve → |
| 27 | Pow(x, n) | Recursion + Math | Medium | LeetCode → |
Dynamic Programming
State definition is the whole battle. Say the recurrence out loud before you write the table. All 12 on the list.
| # | Problem | Pattern | Difficulty | Link |
|---|---|---|---|---|
| 28 | Trapping Rain Water | Monotonic Stack + Two Pointers | Hard | Solve → |
| 29 | Best Time to Buy and Sell Stock | DP | Easy | Solve → |
| 30 | Maximum Subarray | Divide and Conquer + DP | Medium | Solve → |
| 31 | Climbing Stairs | Memoization + DP | Easy | Solve → |
| 32 | Generate Parentheses | Bracket Sequences + Backtracking | Medium | Solve → |
| 33 | House Robber | DP | Medium | Solve → |
| 34 | Jump Game | Greedy + DP | Medium | Solve → |
| 35 | Coin Change | Complete Knapsack + Knapsack Problem | Medium | Solve → |
| 36 | Longest Increasing Subsequence | LIS + Binary Search | Medium | Solve → |
| 37 | Jump Game II | Greedy + DP | Medium | Solve → |
| 38 | Minimum Path Sum | DP | Medium | Solve → |
| 39 | Pascal’s Triangle | DP | Easy | Solve → |
Binary Search
Half of these are binary search on the answer, not on an array. Learn to spot the monotonic predicate. All 7 on the list.
| # | Problem | Pattern | Difficulty | Link |
|---|---|---|---|---|
| 40 | Median of Two Sorted Arrays | Divide and Conquer + Binary Search | Hard | Solve → |
| 41 | Search in Rotated Sorted Array | Binary Search | Medium | Solve → |
| 42 | Koko Eating Bananas | Binary Search | Medium | Solve → |
| 43 | Find Peak Element | Binary Search | Medium | Solve → |
| 44 | Single Element in a Sorted Array | Binary Search | Medium | Solve → |
| 45 | Search Insert Position | Binary Search | Easy | Solve → |
| 46 | Find First and Last Position of Element in Sorted Array | Binary Search | Medium | Solve → |
Trees
Recursion discipline: what you return up, what you pass down. Follow-ups usually push from recursive to iterative. All 6 on the list.
| # | Problem | Pattern | Difficulty | Link |
|---|---|---|---|---|
| 47 | Serialize and Deserialize Binary Tree | Binary Tree + Design | Hard | Solve → |
| 48 | Largest Rectangle in Histogram | Range Query + Monotonic Stack | Hard | Solve → |
| 49 | Sliding Window Maximum | Range Query + Monotonic Queue | Hard | Solve → |
| 50 | Binary Tree Level Order Traversal | Binary Tree + BFS | Medium | Solve → |
| 51 | Binary Tree Zigzag Level Order Traversal | Binary Tree + BFS | Medium | Solve → |
| 52 | Lowest Common Ancestor of a Binary Tree | Lowest Common Ancestor + Binary Lifting | Medium | Solve → |
Strings
Parsing, transformation, and in-place edits. Clarify the character set and whitespace rules before you start. All 6 on the list.
| # | Problem | Pattern | Difficulty | Link |
|---|---|---|---|---|
| 53 | Group Anagrams | Sorting + Hash Table | Medium | Solve → |
| 54 | Roman to Integer | Math + Hash Table | Easy | Solve → |
| 55 | Valid Anagram | Sorting + Hash Table | Easy | Solve → |
| 56 | String to Integer (atoi) | String | Medium | Solve → |
| 57 | Integer to English Words | Recursion + Math | Hard | Solve → |
| 58 | Integer to Roman | Math + Hash Table | Medium | Solve → |
Backtracking
Enumerate with pruning. Interviewers look for a clean choose, explore, unchoose loop and a real complexity bound. All 5 on the list.
| # | Problem | Pattern | Difficulty | Link |
|---|---|---|---|---|
| 59 | Letter Combinations of a Phone Number | Backtracking | Medium | Solve → |
| 60 | N-Queens | Algorithm X + Backtracking | Hard | Solve → |
| 61 | Permutations | Backtracking | Medium | Solve → |
| 62 | Subsets | Backtracking + Bit Manipulation | Medium | Solve → |
| 63 | Word Search | Backtracking + DFS | Medium | Solve → |
Linked List
Pointer surgery under time pressure. Draw the nodes before you write the reassignments. All 5 on the list.
| # | Problem | Pattern | Difficulty | Link |
|---|---|---|---|---|
| 64 | Add Two Numbers | Linked List | Medium | Solve → |
| 65 | Merge Two Sorted Lists | Linked List | Easy | Solve → |
| 66 | Reverse Linked List | Linked List | Easy | Solve → |
| 67 | Reverse Nodes in k-Group | Linked List | Hard | Solve → |
| 68 | Copy List with Random Pointer | Linked List | Medium | LeetCode → |
Heap / Priority Queue
Top-k, streaming medians, and scheduling. Usually the difference between a passing and a timing-out solution. All 4 on the list.
| # | Problem | Pattern | Difficulty | Link |
|---|---|---|---|---|
| 69 | Merge k Sorted Lists | Tournament Sort + Merge Sort | Hard | Solve → |
| 70 | Kth Largest Element in an Array | Quickselect + Divide and Conquer | Medium | Solve → |
| 71 | Meeting Rooms II | Prefix Sum + Heap | Medium | Solve → |
| 72 | Top K Frequent Elements | Quickselect + Bucket Sort | Medium | Solve → |
Graphs
Traversal, connectivity, ordering, and shortest paths. The hardest bucket to fake — either you have drilled it or you have not. All 3 on the list.
| # | Problem | Pattern | Difficulty | Link |
|---|---|---|---|---|
| 73 | Number of Islands | Union-Find + BFS | Medium | Solve → |
| 74 | Longest Consecutive Sequence | Union-Find | Medium | Solve → |
| 75 | Minimum Edge Reversals So Every Node Is Reachable | Graph + BFS | Hard | LeetCode → |
Tries & String Search
Prefix structures and substring matching. Common wherever autocomplete or search is part of the product. All 3 on the list.
| # | Problem | Pattern | Difficulty | Link |
|---|---|---|---|---|
| 76 | Longest Palindromic Substring | Manacher + Two Pointers | Medium | Solve → |
| 77 | Longest Common Prefix | Trie | Easy | Solve → |
| 78 | Find the Index of the First Occurrence in a String | Boyer–Moore String-Search Algorithm + KMP | Easy | Solve → |
Design (Coding)
Build a data structure to a spec. Graded on API shape and the complexity of each operation, not just correctness. All 3 on the list.
| # | Problem | Pattern | Difficulty | Link |
|---|---|---|---|---|
| 79 | LRU Cache | Doubly Linked List + Design | Medium | Solve → |
| 80 | Min Stack | Design + Stack | Medium | Solve → |
| 81 | Find Median from Data Stream | Data Stream + Design | Hard | Solve → |
Microsoft’s Favourite Patterns (Ranked)
| Rank | Pattern | Frequency | Problems on list | Start with |
|---|---|---|---|---|
| 1 | Sliding Window & Two Pointers | Very High | 19 (21%) | Longest Substring Without Repeating Characters, 3Sum, Merge Sorted Array |
| 2 | Arrays & Hashing | High | 13 (14%) | Two Sum, Subarray Sum Equals K, Palindrome Number |
| 3 | Dynamic Programming | High | 12 (13%) | Trapping Rain Water, Best Time to Buy and Sell Stock, Maximum Subarray |
| 4 | Binary Search | Medium-High | 7 (8%) | Median of Two Sorted Arrays, Search in Rotated Sorted Array, Koko Eating Bananas |
| 5 | Trees | Medium-High | 6 (7%) | Serialize and Deserialize Binary Tree, Largest Rectangle in Histogram, Sliding Window Maximum |
| 6 | Strings | Medium-High | 6 (7%) | Group Anagrams, Roman to Integer, Valid Anagram |
| 7 | Backtracking | Medium | 5 (6%) | Letter Combinations of a Phone Number, N-Queens, Permutations |
| 8 | Linked List | Medium | 5 (6%) | Add Two Numbers, Merge Two Sorted Lists, Reverse Linked List |
| 9 | Heap / Priority Queue | Medium | 4 (4%) | Merge k Sorted Lists, Kth Largest Element in an Array, Meeting Rooms II |
| 10 | Graphs | Medium | 3 (3%) | Number of Islands, Longest Consecutive Sequence, Minimum Edge Reversals So Every Node Is Reachable |
How to read this: the top three rows are where your preparation hours should go. A candidate fluent in Sliding Window & Two Pointers, Arrays & Hashing, Dynamic Programming covers the bulk of what Microsoft actually asks. The rest is insurance for the one round that goes somewhere unexpected.
Hiring Manager Round Questions
| # | Question |
|---|---|
| 1 | Walk me through the most technically difficult project you have shipped. |
| 2 | Tell me about a time you disagreed with a technical decision and how you handled it. |
| 3 | Tell me about a project that failed or slipped. What would you do differently? |
| 4 | How do you decide what to work on when everything is labelled urgent? |
| 5 | Tell me about a time you mentored someone or improved how your team works. |
| 6 | Describe a time you had to ship under pressure with known technical debt. |
| 7 | What kind of team and manager do you work best with? |
| 8 | Why Microsoft, and why this team specifically? |
Prepare four to five deep STAR stories rather than ten shallow ones. Microsoft hiring managers go three or four questions deep on a single project, so pick projects you can defend at architecture level.
14-Day Prep Plan
Built from the pattern ranking above, so the heaviest topics get the most time.
| Day | Focus | Problems |
|---|---|---|
| 1 | Sliding Window & Two Pointers (part 1) | Longest Substring Without Repeating Characters, 3Sum, Merge Sorted Array |
| 2 | Sliding Window & Two Pointers (part 2) | Container With Most Water, Remove Duplicates from Sorted Array, Next Permutation |
| 3 | Arrays & Hashing (part 1) | Two Sum, Subarray Sum Equals K, Palindrome Number |
| 4 | Arrays & Hashing (part 2) | Rotate Image, Spiral Matrix, Create Hello World Function |
| 5 | Dynamic Programming (part 1) | Trapping Rain Water, Best Time to Buy and Sell Stock, Maximum Subarray |
| 6 | Dynamic Programming (part 2) | Climbing Stairs, Generate Parentheses, House Robber |
| 7 | Binary Search | Median of Two Sorted Arrays, Search in Rotated Sorted Array, Koko Eating Bananas |
| 8 | Trees | Serialize and Deserialize Binary Tree, Largest Rectangle in Histogram, Sliding Window Maximum |
| 9 | Strings | Group Anagrams, Roman to Integer, Valid Anagram |
| 10 | Backtracking | Letter Combinations of a Phone Number, N-Queens, Permutations |
| 11 | Linked List | Add Two Numbers, Merge Two Sorted Lists, Reverse Linked List |
| 12 | Mock round | Two problems in 45 minutes, timed, no hints. Simulate the real round. |
| 13 | Revision | Redo the problems you failed or needed a hint on. |
| 14 | Light review + rest | Re-read your pattern notes. Sleep early. |
Tips for Microsoft Interviews
- The HM round is the real gate. Unlike most loops, a weak hiring manager round rejects you outright. Prepare stories about ownership, conflict, and shipping under pressure.
- Medium DSA is enough. The data above skews medium. Spend your marginal hour on clean code and edge cases rather than hard graph theory.
- Design for enterprise, not consumer. Multi-tenancy, tenant isolation, compliance, and hybrid cloud come up far more than viral-scale fan-out.
- Show deployment thinking. CI/CD, feature flags, ring-based rollout, canaries, and rollback. Microsoft ships to enterprises that cannot tolerate surprises.
- Treat the design round as a conversation. The interviewer will help if you engage. Ask them what they want to go deeper on rather than monologuing.
- Team match matters. A rejection from one team is not a rejection from Microsoft. Ask the recruiter about other teams if the fit was the issue.