Microsoft Interview Questions: SWE Coding Patterns, Process and Prep (2027 Guide)
A free, practical guide to Microsoft interview questions for software engineers: the coding patterns most frequently reported in public Microsoft SWE interview experiences, LeetCode practice problems with original approach notes, tested Python solutions, plus how the Microsoft hiring process, technical rounds, design discussion and behavioral questions work for new grads, interns and experienced engineers.
Independent community guide; not affiliated with or endorsed by Microsoft.
Last reviewed: December 2026
Honest scope. Microsoft does not publish its interview questions. Nothing here is official or leaked. Process facts come from Microsoft’s own careers pages (linked) or are labeled as publicly reported. Practice problems are public LeetCode problems for the patterns candidates describe most; notes and code in solutions/ are original.
Table of Contents
- The Microsoft hiring process
- Interview rounds for software engineers
- Rules on AI tools
- How Microsoft evaluates candidates
- Coding patterns and practice problems
- Object-oriented design
- System design
- Behavioral questions and the STAR(R) method
- Study plans
- Expectations by level
- New grad and intern notes
- Best resources
- Running the solutions
- FAQ
- Where to go next
- Contributing
The Microsoft hiring process
Microsoft’s official How we hire page lays out the recruiting lifecycle:
| Stage | Official description | What SWE candidates commonly report |
|---|---|---|
| Explore and apply | Search roles, apply with a profile; track status in the Action Center | Referrals and university recruiting are common entry points |
| Application review | Applications are reviewed; some teams hold a brief screening conversation | Recruiter call, sometimes an online coding assessment (often for new grads and interns) |
| Interview | Most interviews include 2-4 conversations, each up to an hour, by phone, Microsoft Teams or in person; some roles include writing code | Often a technical phone screen first, then a final round of 3-5 interviews (“loop”) |
| Offer | Documents to review and sign, “Total Rewards” walkthrough | |
| Pre-onboard and hired | Start date, paperwork, onboarding buddy |
Microsoft hiring is largely team-based: you usually interview for a specific team or org, and interviewers are often from that team. Public reports describe a final interviewer, sometimes called the “as appropriate” (AA) interviewer, who is a senior leader and is often only scheduled if earlier interviews went well. Microsoft does not document this officially, so treat it as reported.
Interview rounds for software engineers
| Round | Length | What happens | Notes |
|---|---|---|---|
| Online assessment (some roles) | 60-90 min | Two or three coding problems on an online platform | Commonly reported for new grads and interns; experienced hires may skip it |
| Technical screen | 45-60 min | One or two coding problems plus resume questions | Often in a shared editor over Teams |
| Coding interviews | up to 60 min each | Data structures and algorithms, sometimes debugging or extending code | Interviewers often ask you to test your code and handle edge cases |
| Design interview | up to 60 min | Object-oriented design for early career; system design for experienced roles | Often tied to the team’s product area |
| Hiring manager / senior leader | up to 60 min | Behavioral and motivation, culture, technical depth on past projects | Growth mindset and collaboration are central |
Microsoft’s interview tips say interviewers want to see your reasoning: ask clarifying questions, state assumptions, explain your approach and tools, and it is fine to say when you are stuck.
Rules on AI tools
Microsoft’s Candidate Code of Conduct (on the How we hire page) encourages responsible AI use while preparing, but says that during assessments and interviews candidates should demonstrate their own skills without outside assistance unless explicitly permitted. Assume no AI during any round unless your recruiter tells you otherwise.
How Microsoft evaluates candidates
Microsoft’s hiring page says it uses structured interviews and a consistent framework, and looks for its values of respect, integrity, accountability and growth mindset. Its interview tips describe cultural aspects interviewers look for, including growth mindset, diversity and inclusion, “One Microsoft” collaboration, customer obsession, values and manager expectations. In coding rounds, commonly reported criteria are:
| Area | What strong looks like |
|---|---|
| Problem solving | Clarifies, starts with a simple approach, improves it, explains complexity |
| Code quality | Readable, correct code with good names; handles null and empty inputs |
| Testing | Walks through test cases, including edge cases, without being asked |
| Collaboration | Takes hints well, thinks aloud, treats the interviewer as a teammate |
| Growth mindset | Admits gaps, learns within the interview, reflects on mistakes |
Coding patterns and practice problems
Microsoft reports lean toward linked lists, strings, trees, matrices and classic “implement this” problems, usually medium difficulty with careful edge-case handling. Problems marked “Solution included” have tested code in solutions/microsoft.py. “Premium (paid)” problems need LeetCode Premium; every section has free ones.
1. Linked lists
Linked list manipulation is one of the most frequently reported Microsoft themes. Practice pointer handling until it is automatic.
| # | Problem | Level | Access | Approach notes |
|---|---|---|---|---|
| 1 | 206. Reverse Linked List | Easy | Free | Iterative three-pointer reversal (prev, cur, next). Solution included. |
| 2 | 25. Reverse Nodes in k-Group | Hard | Free | Check k nodes exist, reverse that group, connect to the recursively processed rest. Solution included. |
| 3 | 2. Add Two Numbers | Medium | Free | Walk both lists with a carry; append a final carry node. |
| 4 | 21. Merge Two Sorted Lists | Easy | Free | Dummy head and a tail pointer. |
| 5 | 160. Intersection of Two Linked Lists | Easy | Free | Two pointers that switch to the other head at the end; they meet at the intersection or both reach None. |
| 6 | 141. Linked List Cycle | Easy | Free | Floyd’s slow and fast pointers. |
| 7 | 234. Palindrome Linked List | Easy | Free | Find the middle, reverse the second half, compare, optionally restore. |
| 8 | 143. Reorder List | Medium | Free | Middle, reverse second half, interleave. |
| 9 | 19. Remove Nth Node From End of List | Medium | Free | Advance a lead pointer n steps, then move both. |
| 10 | 138. Copy List with Random Pointer | Medium | Free | Interleave copies or map old to new. |
| 11 | 237. Delete Node in a Linked List | Medium | Free | Copy the next node’s value into this node and skip the next node. |
| 12 | 430. Flatten a Multilevel Doubly Linked List | Medium | Free | DFS with a stack; splice child lists in place. |
2. Strings
| # | Problem | Level | Access | Approach notes |
|---|---|---|---|---|
| 1 | 8. String to Integer (atoi) | Medium | Free | Handle spaces, sign, digits and 32-bit clamping explicitly. Solution included. |
| 2 | 151. Reverse Words in a String | Medium | Free | Split on whitespace and reverse; in place: reverse all, then reverse each word. |
| 3 | 5. Longest Palindromic Substring | Medium | Free | Expand around centers. |
| 4 | 49. Group Anagrams | Medium | Free | Key by sorted letters. |
| 5 | 38. Count and Say | Medium | Free | Run-length encode the previous term n-1 times. |
| 6 | 12. Integer to Roman | Medium | Free | Greedy over value-symbol pairs including subtractive forms (900, 400, 90, …). |
| 7 | 13. Roman to Integer | Easy | Free | Subtract a symbol when a larger symbol follows it. |
| 8 | 168. Excel Sheet Column Title | Easy | Free | Bijective base 26: subtract 1 before each divmod. Solution included. |
| 9 | 443. String Compression | Medium | Free | Read and write pointers over the same array. |
| 10 | 43. Multiply Strings | Medium | Free | Grade-school multiplication into a position array of length m + n. |
| 11 | 165. Compare Version Numbers | Medium | Free | Split on “.”, compare integers with zero padding. |
| 12 | 387. First Unique Character in a String | Easy | Free | Count, then the first index with count 1. |
| 13 | 1647. Minimum Deletions to Make Character Frequencies Unique | Medium | Free | Sort counts descending; lower each count until it is unused (or zero). Solution included. |
3. Arrays and matrices
| # | Problem | Level | Access | Approach notes |
|---|---|---|---|---|
| 1 | 54. Spiral Matrix | Medium | Free | Shrink four boundaries after each side. Solution included. |
| 2 | 48. Rotate Image | Medium | Free | Transpose, then reverse each row. Solution included. |
| 3 | 73. Set Matrix Zeroes | Medium | Free | Use the first row and column as markers; track the first row/column separately. |
| 4 | 36. Valid Sudoku | Medium | Free | Sets per row, column and 3x3 box. |
| 5 | 53. Maximum Subarray | Medium | Free | Kadane’s algorithm. |
| 6 | 268. Missing Number | Easy | Free | XOR of indices and values, or the sum formula. |
| 7 | 41. First Missing Positive | Hard | Free | Place each value v at index v-1 by swapping; the first mismatch is the answer. |
| 8 | 11. Container With Most Water | Medium | Free | Two pointers, move the shorter wall. |
| 9 | 42. Trapping Rain Water | Hard | Free | Two pointers with running maxima. |
| 10 | 75. Sort Colors | Medium | Free | Dutch national flag with three pointers. |
| 11 | 179. Largest Number | Medium | Free | Sort strings by comparing a+b vs b+a; strip leading zeros. |
| 12 | 169. Majority Element | Easy | Free | Boyer-Moore voting. |
| 13 | 240. Search a 2D Matrix II | Medium | Free | Start at the top-right; move left or down. |
4. Trees
| # | Problem | Level | Access | Approach notes |
|---|---|---|---|---|
| 1 | 98. Validate Binary Search Tree | Medium | Free | Recursive (low, high) bounds. Solution included. |
| 2 | 236. Lowest Common Ancestor of a Binary Tree | Medium | Free | Post-order: the node where both subtrees report a target. |
| 3 | 102. Binary Tree Level Order Traversal | Medium | Free | BFS by level. Solution included. |
| 4 | 103. Binary Tree Zigzag Level Order Traversal | Medium | Free | Level order with alternating direction. |
| 5 | 105. Construct Binary Tree from Preorder and Inorder Traversal | Medium | Free | Preorder gives the root; inorder index splits left and right; use a dict for O(n). |
| 6 | 297. Serialize and Deserialize Binary Tree | Hard | Free | Pre-order with null markers. |
| 7 | 116. Populating Next Right Pointers in Each Node | Medium | Free | Use already-built next pointers of the level above, O(1) extra space. |
| 8 | 230. Kth Smallest Element in a BST | Medium | Free | In-order traversal. |
| 9 | 285. Inorder Successor in BST | Medium | Premium (paid) | Walk down: going left records a candidate successor. |
| 10 | 101. Symmetric Tree | Easy | Free | Mirror recursion on (left, right) pairs. |
| 11 | 545. Boundary of Binary Tree | Medium | Premium (paid) | Left boundary, leaves, reversed right boundary, avoiding duplicates. |
5. Graphs and backtracking
| # | Problem | Level | Access | Approach notes |
|---|---|---|---|---|
| 1 | 200. Number of Islands | Medium | Free | Flood fill. |
| 2 | 79. Word Search | Medium | Free | DFS with backtracking on the board. |
| 3 | 207. Course Schedule | Medium | Free | Topological sort / cycle detection. |
| 4 | 133. Clone Graph | Medium | Free | DFS with a copy map. |
| 5 | 130. Surrounded Regions | Medium | Free | Mark “O” cells connected to the border, flip the rest. |
| 6 | 277. Find the Celebrity | Medium | Premium (paid) | One pass to find a candidate, one pass to verify. |
| 7 | 22. Generate Parentheses | Medium | Free | Backtrack with open and close counts. |
| 8 | 46. Permutations | Medium | Free | Backtrack with a used array or swaps. |
| 9 | 17. Letter Combinations of a Phone Number | Medium | Free | Backtrack over digit-to-letters map. |
| 10 | 51. N-Queens | Hard | Free | Backtrack row by row with column and diagonal sets. |
6. Design-a-class problems
| # | Problem | Level | Access | Approach notes |
|---|---|---|---|---|
| 1 | 146. LRU Cache | Medium | Free | Hash map plus doubly linked list. Solution included. |
| 2 | 155. Min Stack | Medium | Free | Store (value, current min) pairs. |
| 3 | 208. Implement Trie (Prefix Tree) | Medium | Free | Nested dicts with an end marker. |
| 4 | 380. Insert Delete GetRandom O(1) | Medium | Free | Array plus index map; delete by swapping with the last element. |
| 5 | 348. Design Tic-Tac-Toe | Medium | Premium (paid) | Row, column and diagonal counters (+1 / -1 per player) for O(1) moves. |
| 6 | 353. Design Snake Game | Medium | Premium (paid) | Deque for the body plus a set for collision checks. |
| 7 | 295. Find Median from Data Stream | Hard | Free | Two heaps. |
| 8 | 1472. Design Browser History | Medium | Free | List with a current index; visiting truncates forward history. |
7. Dynamic programming
| # | Problem | Level | Access | Approach notes |
|---|---|---|---|---|
| 1 | 70. Climbing Stairs | Easy | Free | Fibonacci recurrence with two variables. |
| 2 | 198. House Robber | Medium | Free | dp = max(skip, take) with two rolling variables. |
| 3 | 91. Decode Ways | Medium | Free | dp over prefixes checking one-digit and two-digit codes. |
| 4 | 62. Unique Paths | Medium | Free | Row DP. |
| 5 | 72. Edit Distance | Medium | Free | Classic 2D DP. |
| 6 | 300. Longest Increasing Subsequence | Medium | Free | Patience sorting with bisect. |
| 7 | 322. Coin Change | Medium | Free | Unbounded knapsack. |
| 8 | 221. Maximal Square | Medium | Free | dp of square side ending at each cell. |
Object-oriented design
Early-career Microsoft interviews often include an object-oriented design discussion. Commonly reported prompts (practice on a whiteboard, no LeetCode equivalent):
| Prompt | Key classes | What to discuss |
|---|---|---|
| Elevator system | Elevator, Request, Controller | Scheduling strategy, states, extensibility to multiple elevators |
| Parking lot | Lot, Level, Spot, Vehicle, Ticket | Spot assignment, pricing strategy |
| File system | Entry, File, Directory, Path resolver | Composite pattern, permissions, search |
| Chess or tic-tac-toe | Board, Piece, Move, Game | Move validation, extensibility to new pieces |
| Library or vending machine | Item, Inventory, Transaction, State | State machine, concurrency of payments |
| Text editor with undo | Document, Command, History | Command pattern, memory tradeoffs |
System design
For experienced roles, design interviews are often anchored in the team’s product area (cloud services, Office, Teams, gaming, developer tools). Commonly reported prompts:
| Prompt | Focus areas |
|---|---|
| Design a chat or messaging service (Teams-like) | Presence, delivery guarantees, fan-out, message storage |
| Design a collaborative document editor | Conflict resolution (OT/CRDT), versioning, offline edits |
| Design a file sync service (OneDrive-like) | Chunking, dedup, metadata service, conflict handling |
| Design a URL shortener | IDs, caching, analytics |
| Design a rate limiter | Token bucket, distributed counters |
| Design a job scheduler | Queues, retries, idempotency, worker leasing |
| Design a telemetry or logging pipeline | Ingestion at scale, partitioning, retention, querying |
Free Microsoft-published reading that maps well to design interviews:
- Azure Architecture Center - reference architectures and best practices.
- Cloud design patterns - retry, circuit breaker, CQRS, sharding, queue-based load leveling and more.
- Azure Well-Architected Framework - reliability, security, cost, operations and performance tradeoffs.
- The System Design Primer - general fundamentals.
Behavioral questions and the STAR(R) method
Microsoft’s interview tips recommend the STAR(R) model: Situation, Task, Action, Result, and Reflection (what you learned or would do differently). Reflection is where growth mindset shows. Prepare examples of applying feedback, working with others and adapting your approach.
Commonly reported question themes (paraphrased, not official):
| Theme | Example question |
|---|---|
| Growth mindset | Tell me about a time you failed and what you learned. |
| Feedback | Describe critical feedback you received and how you used it. |
| Collaboration (“One Microsoft”) | Tell me about working with another team to ship something. |
| Customer focus | Tell me about a time you changed your work because of customer input. |
| Conflict | Describe a disagreement on technical direction and how it ended. |
| Ambiguity | Tell me about a project with unclear requirements. |
| Motivation | Why Microsoft, and why this team? |
Read Microsoft’s culture page before the interview; interviewers often connect questions to it.
Study plans
4-week plan
| Week | Coding (sections) | Other |
|---|---|---|
| 1 | 1, 2 | Draft 8 STAR(R) stories |
| 2 | 3, 4 | One timed 45-minute mock |
| 3 | 5, 6 | One OOD prompt and (experienced) one system design prompt |
| 4 | 7 + redo misses | Two full mocks; research the team’s product |
2-week sprint
Sections 1, 2 and 4 first (the most frequently reported areas), then 6 and 3; one mock every other day; keep the last day light.
Expectations by level
Microsoft uses numeric levels. Commonly reported mapping (not official, varies by org):
| Levels | Typical title | Interview emphasis |
|---|---|---|
| 59-60 | Software Engineer (entry) | Coding fundamentals, OOD, learning ability |
| 61-62 | Software Engineer II | Coding plus some design, ownership of features |
| 63-64 | Senior Software Engineer | System design, technical leadership, mentoring |
| 65+ | Principal and above | Architecture across teams, strategy, influence |
New grad and intern notes
- Online assessments are commonly reported for university hiring; practice two medium problems in about 60-90 minutes with hidden test cases.
- Final rounds for interns are often shorter (two or three interviews) and focus on coding and learning ability.
- Microsoft lists separate student and recent graduate guidance on its hiring tips page; read it with your invite.
- Talk about class projects, hackathons and internships with STAR(R), and emphasize what you learned.
Best resources
| Resource | Type | Cost | Best for |
|---|---|---|---|
| Microsoft: How we hire | Official page | Free | Process, Candidate Code of Conduct |
| Microsoft: Interview tips | Official page | Free | STAR(R), what interviewers look for |
| Microsoft culture | Official page | Free | Growth mindset and values |
| Microsoft Learn | Free courses | Free | Brushing up on the team’s stack (Azure, .NET, TypeScript) |
| NeetCode roadmap | Problem list + videos | Free (paid tier exists) | Pattern practice |
| LeetCode | Practice platform | Free; Premium is paid | Problems |
| Azure Architecture Center | Docs | Free | System design patterns |
| The System Design Primer | GitHub guide | Free | Design fundamentals |
| Open Data Structures | Open textbook | Free (CC BY) | Linked lists, trees, heaps refresher |
| Cracking the Coding Interview by Gayle Laakmann McDowell | Book | Paid | Classic practice; strong on linked lists and strings |
Best pick if you only use three: Microsoft’s two official pages, NeetCode’s roadmap, and the Azure cloud design patterns for design rounds.
Running the solutions
git clone https://github.com/Ralpberry-Labs/microsoft-interview-questions.git
cd microsoft-interview-questions
python3 -m unittest discover -v
Python 3 standard library only.
FAQ
Are these real Microsoft interview questions? No. These are public LeetCode problems that practice patterns frequently reported in public Microsoft interview experiences. Microsoft does not publish its questions and this repo uses no leaked content.
How many interviews are in a Microsoft loop? Microsoft says most interviews include 2-4 conversations of up to an hour each. Public reports for SWE roles often describe a screen followed by three to five final interviews.
How hard are Microsoft coding interviews? Mostly medium difficulty, with emphasis on correct, clean code and edge cases. Linked lists, strings and trees come up often.
Can I use AI tools during a Microsoft interview? Not unless explicitly permitted. Microsoft’s Candidate Code of Conduct says candidates should show their own skills without outside assistance during assessments and interviews unless allowed.
What is the “as appropriate” interview? A publicly reported term for a final interview with a senior leader, sometimes scheduled only if earlier rounds went well. Microsoft does not document it officially.
Does Microsoft ask system design? Usually for experienced roles (often senior levels). Early-career candidates more often get object-oriented design.
What language should I use? Any mainstream language you know well. C#, C++, Java, Python and TypeScript are all common at Microsoft.
What is STAR(R)? Microsoft’s recommended answer structure: Situation, Task, Action, Result, plus Reflection on what you learned.
Do I need LeetCode Premium? No. Every section includes free problems.
Where to go next
- google-interview-questions, meta-interview-questions, amazon-interview-questions
- leetcode-master-150 - ordered problem plan with solutions.
- tech-interview-handbook-behavioral - behavioral story bank.
Contributing
Issues and pull requests are welcome for broken links, process changes with a public source, new practice problems with your own notes, and solution bugs (add a failing test). Please never submit confidential, NDA-covered or leaked questions, or copied paid content.
If this helped you, a star helps others find it.
More free resources
Part of the Ralpberry Labs open-source collection. See also Top 100 Open Source.