MICROSOFT · CODING QUESTIONS
Microsoft coding interview questions
The data structures and algorithms questions candidates report from Microsoft interviews, linked to AlgoRung problems with an editor, hidden tests, an animated walkthrough and solutions in four languages. Most asked topics: Arrays & Hashing, Linked List, Trees & BST, Graphs.
All 21 reported Microsoft coding questions
- Reverse Words in a String Medium Arrays & Hashing
- Two Sum Easy Arrays & Hashing also Amazon, Atlassian, Swiggy
- Word Search Medium Recursion & Backtracking also PhonePe
- First Missing Positive Hard Arrays & Hashing also Flipkart, Walmart Global Tech
- Spiral Matrix Medium Arrays & Hashing also Adobe
- Longest Substring with At Most K Distinct Characters Medium Arrays & Hashing also Razorpay
- Reverse Nodes in k-Group Hard Linked List also Amazon
- Copy List with Random Pointer Medium Linked List also Amazon, Meta
- Merge k Sorted Lists Hard Heaps also Amazon
- Swap Nodes in Pairs Medium Linked List
- Sort List Medium Linked List
- Construct Binary Tree from Preorder and Inorder Traversal Medium Trees & BST
- Validate Binary Search Tree Medium Trees & BST
- Number of Islands Medium Graphs also Amazon, Meta, Goldman Sachs +1
- Median of Two Sorted Arrays Hard Binary Search also Adobe
- Trapping Rain Water Hard Arrays & Hashing also Amazon, Goldman Sachs, Salesforce +1
- LRU Cache Medium Design Data Structures also Amazon, Apple, Netflix +4
- Container With Most Water Medium Arrays & Hashing also Goldman Sachs
- Sort Colors Medium Arrays & Hashing
- Decode String Medium Stack also Google
- Gas Station Medium Arrays & Hashing also Amazon
No questions match.
Also reported, not on AlgoRung yet (4)
String Compression · Delete Node in a BST · Regular Expression Matching · Sliding Window Maximum
Questions people ask
What coding questions does Microsoft ask?
Candidates most often report Reverse Words in a String, Two Sum, Word Search, First Missing Positive, Spiral Matrix. The full list of 21 reported questions is on this page, each linked to a practice problem with solutions.
Which topics should I study for the Microsoft coding interview?
arrays and strings, linked lists, trees, graphs, two pointers, sliding window. A 45 to 60 minute live interview where you solve one or two data-structures-and-algorithms problems while explaining your thinking. Interviewers score problem solving, code quality, testing and communication.
How hard are Microsoft coding questions?
Of the reported questions on AlgoRung, 1 are easy, 15 medium and 5 hard. Expect mostly medium problems, with follow-ups that change a constraint.
Coding questions at other companies
- Amazon
- Meta
- Apple
- Netflix
- Uber
- Airbnb
- Stripe
- Atlassian
- Goldman Sachs
- Salesforce
- Oracle
- Adobe
- Flipkart
- Walmart Global Tech
- PhonePe
- Swiggy
- Razorpay
Coding questions across all companies · Behavioral questions