Microsoft SDE-2 Interview Guide
These are coding problems that candidates have reported from Microsoft interviews, ordered so you can start with the ones that come up most. Microsoft interviews lean on clear fundamentals and on how you handle edge cases, so test your solution with small examples before you say you are done.
Treat the list as practice for the patterns, not a script: interviewers change the numbers and the story, and they care more about how you reason out loud than about a memorised answer.
Coding problems
- Two Sum (Basic)
- Contains Duplicate (Basic)
- Best Time to Buy and Sell Stock (Basic)
- Maximum Subarray (Intermediate)
- Valid Parentheses (Basic)
- Longest Substring Without Repeats (Intermediate)
- Product of Array Except Self (Intermediate)
- Move Zeroes (Basic)
- Search Insert Position (Basic)
- Rotate Array (Intermediate)
- Climbing Stairs (Basic)
- House Robber (Intermediate)
- Coin Change (Intermediate)
- Longest Increasing Subsequence (Advanced)
- Reverse String (Basic)
- First Unique Character (Basic)
- Valid Palindrome (Basic)
- Kth Largest Element (Intermediate)
- Single Number (Basic)
- Majority Element (Basic)
- Missing Number (Basic)
- Intersection of Two Arrays (Basic)
- Two Sum in a Sorted Array (Basic)
- Minimum Size Subarray Sum (Intermediate)
- Longest Consecutive Sequence (Intermediate)
- Subarray Sum Equals K (Intermediate)
- Container With Most Water (Intermediate)
- Trapping Rain Water (Advanced)
- Decode Ways (Intermediate)
- Longest Palindromic Substring (Intermediate)
- Valid Anagram (Basic)
- Ransom Note (Basic)
- Power of Two (Basic)
- Number of One Bits (Basic)
- Happy Number (Intermediate)
- Fibonacci Number (Basic)
- Sort Colors (Basic)
- Remove Element (Basic)
- Third Maximum Number (Basic)
- Max Consecutive Ones (Basic)
- Find Pivot Index (Basic)
- Running Sum of Array (Basic)
- Squares of a Sorted Array (Basic)
- Largest Rectangle in Histogram (Advanced)
- Daily Temperatures (Intermediate)
- Valid Mountain Array (Basic)
- Repeated Substring Pattern (Intermediate)
- Reverse Words in a String (Basic)
- Count and Say (Intermediate)
- Reverse Vowels of a String (Basic)
- Integer to Roman (Intermediate)
- Roman to Integer (Intermediate)
- Excel Column Number (Basic)
- Add Binary (Basic)
- Power of Three (Basic)
- Count Primes (Intermediate)
- Length of Last Word (Basic)
- Counting Bits (Intermediate)
- Power of Four (Basic)
- Min Cost Climbing Stairs (Intermediate)
Related
- Company interview roadmaps
- System design interview questions
- SDE-2 preparation plan
- Solo system design practice, scored out of 10
Frequently asked questions
What does a Microsoft SDE-2 loop look like?
Several one-on-one rounds mixing coding, design and behavioral questions, often ending with a conversation with a hiring manager.
Do they ask low-level design?
Often, yes. Expect to model a small system with classes and interfaces, and to explain why you split responsibilities the way you did.