Coding interview questions

Microsoft Coding Interview Questions (DSA)

The 50 DSA problems Microsoft has asked most in the last six months, most-asked first. 50 of them have a full breakdown with diagrams and code. Tick them off as you go.

Practice a Microsoft interview with me

I'm Alex. I'll pick 2 problems from Microsoft's list at your level and interview you like a real Microsoft round.

50problems
50full breakdowns
45topics

By difficulty: Easy (17) · Medium (24) · Hard (9)

Start Microsoft Mock Interview→

Topics

1.Two Sum
Full breakdownArrayHash Table
Easy+10▶ Mock
2.Add Two Numbers
Full breakdownLinked ListMathRecursion
Medium+3▶ Mock
5.Longest Palindromic Substring
Full breakdownTwo PointersStringDynamic Programming
Medium+8▶ Mock
53.Maximum Subarray
Full breakdownArrayDivide and ConquerDynamic Programming
Medium+7▶ Mock
56.Merge Intervals
Full breakdownArraySortingQuicksort
Medium+14▶ Mock
15.3Sum
Full breakdownArrayTwo PointersSorting
Medium+5▶ Mock
26.Remove Duplicates from Sorted Array
Full breakdownArrayTwo Pointers
Easy+2▶ Mock
17.Letter Combinations of a Phone Number
Full breakdownHash TableStringBacktracking
Medium+1▶ Mock
128.Longest Consecutive Sequence
Full breakdownArrayHash TableUnion-Find
Medium+3▶ Mock
322.Coin Change
Full breakdownArrayDynamic ProgrammingBreadth-First Search
Medium+4▶ Mock
3345.Smallest Divisible Digit Product I
Full breakdownMathEnumeration
21.Merge Two Sorted Lists
Full breakdownLinked ListRecursion
Easy+2▶ Mock
4.Median of Two Sorted Arrays
Full breakdownArrayBinary SearchDivide and Conquer
Hard+5▶ Mock
645.Set Mismatch
Full breakdownArrayHash TableBit Manipulation
189.Rotate Array
Full breakdownArrayMathTwo Pointers
Medium+1▶ Mock
1929.Concatenation of Array
Full breakdownArraySimulation
20.Valid Parentheses
Full breakdownStringStackBracket Sequences
Easy+3▶ Mock
2213.Longest Substring of One Repeating Character
Full breakdownArrayStringSegment Tree
283.Move Zeroes
Full breakdownArrayTwo Pointers
9.Palindrome Number
Full breakdownMath
829.Consecutive Numbers Sum
Full breakdownMathEnumeration
1335.Minimum Difficulty of a Job Schedule
Full breakdownArrayDynamic Programming
424.Longest Repeating Character Replacement
Full breakdownHash TableStringSliding Window
Medium▶ Mock
121.Best Time to Buy and Sell Stock
Full breakdownArrayDynamic Programming
Easy+10▶ Mock
402.Remove K Digits
Full breakdownStringStackGreedy
Medium▶ Mock
994.Rotting Oranges
Full breakdownArrayBreadth-First SearchMatrix
Medium+5▶ Mock
560.Subarray Sum Equals K
Full breakdownArrayHash TablePrefix Sum
Medium+2▶ Mock
3718.Smallest Missing Multiple of K
Full breakdownArrayHash Table
1802.Maximum Value at a Given Index in a Bounded Array
Full breakdownMathBinary SearchGreedy
Medium▶ Mock
146.LRU Cache
Full breakdownHash TableLinked ListDesign
Medium+9▶ Mock
88.Merge Sorted Array
Full breakdownArrayTwo PointersSorting
Easy+1▶ Mock
2858.Minimum Edge Reversals So Every Node Is Reachable
Full breakdownDynamic ProgrammingDepth-First SearchBreadth-First Search
516.Longest Palindromic Subsequence
Full breakdownStringDynamic Programming
Medium▶ Mock
138.Copy List with Random Pointer
Full breakdownHash TableLinked List
Medium+1▶ Mock
198.House Robber
Full breakdownArrayDynamic Programming
Medium+1▶ Mock
503.Next Greater Element II
Full breakdownArrayStackMonotonic Stack
Medium▶ Mock
76.Minimum Window Substring
Full breakdownHash TableStringSliding Window
2571.Minimum Operations to Reduce an Integer to 0
Full breakdownDynamic ProgrammingGreedyBit Manipulation
Medium▶ Mock
239.Sliding Window Maximum
Full breakdownArrayQueueSliding Window
Hard+2▶ Mock
3.Longest Substring Without Repeating Characters
Full breakdownHash TableStringSliding Window
Medium+13▶ Mock
269.Alien Dictionary
Full breakdownArrayStringDepth-First Search
Hard+2▶ Mock
303.Range Sum Query - Immutable
Full breakdownArrayDesignPrefix Sum
144.Binary Tree Preorder Traversal
Full breakdownStackTreeDepth-First Search
347.Top K Frequent Elements
Full breakdownArrayHash TableDivide and Conquer
Medium+6▶ Mock
84.Largest Rectangle in Histogram
Full breakdownArrayStackMonotonic Stack
11.Container With Most Water
Full breakdownArrayTwo PointersGreedy
Medium+6▶ Mock
13.Roman to Integer
Full breakdownHash TableMathString
Easy+1▶ Mock
31.Next Permutation
Full breakdownArrayTwo Pointers
Medium▶ Mock

Frequently Asked Questions

What questions does Microsoft ask in coding interviews?

Microsoft coding interviews focus on Array, Backtracking, Binary Search, Binary Tree, and other data structure problems. We compiled 50 questions from real Microsoft interviews. The most common topics are Array, Backtracking, Binary Search, Binary Tree, Bit Manipulation. Filter by topic to see what comes up most often.

How many Microsoft coding interview questions are there?

InterviewSkool has 50 Microsoft coding interview questions: 17 Easy, 24 Medium, and 9 Hard. Most Microsoft interviews focus on Medium-difficulty problems, so prioritize those in your prep.

How should I prepare for Microsoft coding interviews?

Start with Medium difficulty problems. Group by topic (Array, Tree, DP) to build pattern recognition. Aim to solve 30 to 40 problems before your interview. Then practice under pressure with a mock interview.

Are Microsoft coding interview questions free?

Yes. All 50 Microsoft coding interview questions are free to browse with no sign-up required. You can filter by difficulty and topic tags. Start a mock interview with a free credit to practice under real pressure.

Practice with a Mock Interview

Simulate real Microsoft interview pressure with our AI interviewer.

Start Mock Interview →