Microsoft Interview Guide
Microsoft’s loops are the most collaborative of the big five. Interviewers routinely work the problem with you, offer hints early, and treat a hint taken well as a positive signal rather than a deduction. Candidates coming from a Google-shaped mental model often over-perform the stoic lone-genius act and score worse for it.
The bar leans toward clean, production-shaped code rather than exotic algorithms: sensible names, handled edge cases, a function you would be willing to review. Expect mediums, expect to be asked about testing, and expect the conversation to matter.
The most conversational of the big five, and the most likely to care about code quality rather than just correctness. Expect discussion of edge cases, naming and testability.
The loop
The bar
What they lean on
This is the durable part. Which pattern families a company favours is far more stable than which individual problems it uses, so prepare in this order:
-
linked-lists -
binary-trees-and-bst -
strings -
design-with-stacks-and-queues -
matrix-and-grid-manipulation -
one-dimensional-dp
Quirks worth knowing
- Expect to be asked to walk your own code through a test case line by line.
- Real-world framing is common ("this array is a log of requests"), so restate the problem in plain terms first.
- Deep questions about your own past projects are standard. Have one project you can defend at architecture level.
Reported problems
- 1Two Sumeasy
- 20Valid Parentheseseasy
- 121Best Time to Buy and Sell Stockeasy
- 206Reverse Linked Listeasy
- 21Merge Two Sorted Listseasy
- 141Linked List Cycleeasy
- 217Contains Duplicateeasy
- 3Longest Substring Without Repeating Charactersmedium
- 153Summedium
- 53Maximum Subarraymedium
- 146LRU Cachemedium
- 200Number of Islandsmedium
- 33Search in Rotated Sorted Arraymedium
- 72Edit Distancemedium
- 75Sort Colorsmedium
- 102Binary Tree Level Order Traversalmedium
- 236Lowest Common Ancestor of a Binary Treemedium
- 238Product of Array Except Selfmedium
- 300Longest Increasing Subsequencemedium
- 322Coin Changemedium
- 1143Longest Common Subsequencemedium
- 138Copy List with Random Pointermedium
- 994Rotting Orangesmedium
- 4Median of Two Sorted Arrayshard
Pitfalls
Section titled “Pitfalls”- Refusing hints. A hint accepted and built on is a positive signal here. Silently struggling for ten minutes is not.
- Writing contest-style code. Single-letter names and no edge-case handling read badly when the bar is “would I approve this pull request?”
- Not asking about testing. Offer the test categories unprompted — it is closer to the day job than the algorithm is, and it is explicitly valued.
- Treating it as easier because it is friendlier. The collaboration is genuine; the bar is not lower. Clean beats clever, and clean is harder to fake.
Interview follow-ups
Section titled “Interview follow-ups”| They ask | What they’re checking | The answer |
|---|---|---|
| “Would you like a hint?” | Whether you collaborate | Yes — and say what you were stuck on first. Naming the stuck point turns the hint into a dialogue rather than a rescue. |
| “How would you test this?” | Engineering instinct | Categories rather than examples: empty, one element, duplicates, maximum size, and the specific boundary the algorithm pivots on. |
| “What would you extract if this were production code?” | Whether you know interview code is not production code | Input validation, a named helper for the core transform, magic numbers as constants — while saying you deliberately skipped them for the 45-minute version. |
| “Can you make this more readable?” | That clean is the actual bar | Take it seriously: extract the condition into a named predicate, split the loop body, rename i/j to what they index. |
Recall card
Section titled “Recall card”- Collaborative by design. Hints are offered early and taking one well is a positive signal.
- The bar is clean, reviewable code — names, edge cases, a function you would approve. Clean beats clever.
- Offer the test categories unprompted. It is explicitly valued and closest to the day job.
- Friendly is not easier. Say what you are stuck on rather than going quiet.
- Know what you would extract for production — and say you skipped it on purpose.
pch.coffeeTagline
pch.coffeeCtapch.feedbackHeading
pch.feedbackSubheading