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.

From public candidate reports and Microsoft's careers pages, checked November 2026. Processes vary by team. AlgoRung is not affiliated with Microsoft.

All 21 reported Microsoft coding questions

Difficulty
Topic
21 questions
  1. Reverse Words in a String Medium Arrays & Hashing
  2. Two Sum Easy Arrays & Hashing also Amazon, Atlassian, Swiggy
  3. Word Search Medium Recursion & Backtracking also PhonePe
  4. First Missing Positive Hard Arrays & Hashing also Flipkart, Walmart Global Tech
  5. Spiral Matrix Medium Arrays & Hashing also Adobe
  6. Longest Substring with At Most K Distinct Characters Medium Arrays & Hashing also Razorpay
  7. Reverse Nodes in k-Group Hard Linked List also Amazon
  8. Copy List with Random Pointer Medium Linked List also Amazon, Meta
  9. Merge k Sorted Lists Hard Heaps also Amazon
  10. Swap Nodes in Pairs Medium Linked List
  11. Sort List Medium Linked List
  12. Construct Binary Tree from Preorder and Inorder Traversal Medium Trees & BST
  13. Validate Binary Search Tree Medium Trees & BST
  14. Number of Islands Medium Graphs also Amazon, Meta, Goldman Sachs +1
  15. Median of Two Sorted Arrays Hard Binary Search also Adobe
  16. Trapping Rain Water Hard Arrays & Hashing also Amazon, Goldman Sachs, Salesforce +1
  17. LRU Cache Medium Design Data Structures also Amazon, Apple, Netflix +4
  18. Container With Most Water Medium Arrays & Hashing also Goldman Sachs
  19. Sort Colors Medium Arrays & Hashing
  20. Decode String Medium Stack also Google
  21. Gas Station Medium Arrays & Hashing also Amazon
Also reported, not on AlgoRung yet (4)

String Compression · Delete Node in a BST · Regular Expression Matching · Sliding Window Maximum

How the coding round is scored · The online assessment

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

Coding questions across all companies · Behavioral questions