Microsoft Interview Questions 2026
20 real interview questions asked at Microsoft. Covers DSA / Arrays, System Design, DSA / Trees, Domain, Behavioral, DSA / Graphs, AI / Agents, React / React 19, TypeScript / Types, System Design / Collaboration, DSA / Design, C# / Async, Java / Streams, Python / Decorators, System Design / Notifications. Reported by engineers who went through the Microsoft process.
DSA / Arrays (2)
Given a matrix of 0s and 1s, find the largest rectangle containing only 1s and return its area. Walk through the histogram-based O(n*m) solution and discuss why the naive O(n2*m2) approach is unacceptable at scale.
Find all pairs in an array that sum to a given target value. Explain the HashSet approach for O(n) time, handle duplicate pairs correctly, and discuss edge cases (negative numbers, empty array).
System Design (3)
Design Microsoft Teams' presence system. How do you propagate "online / away / busy" status to millions of users with sub-second latency without overwhelming the backend?
Design Azure Blob Storage. How do you store, replicate, and serve petabytes of unstructured data with 11 nines of durability? Cover: chunking, erasure coding vs 3-way replication, geo-redundancy, and handling hot blobs.
Design a collaborative code editor like VS Code Live Share. Multiple developers edit the same file simultaneously with cursors visible to all. Cover: OT vs CRDT, undo/redo in a collaborative context, and low-latency sync across regions.
DSA / Trees (2)
Given a binary search tree, find the kth smallest element. Optimize for the case where this function is called many times on a static tree.
Given a binary tree, print nodes level by level (BFS traversal). Then modify it to print alternate levels in reverse order (zigzag traversal). Analyse time and space complexity.
Domain (1)
Explain the difference between process and thread in Windows. What is a fiber? Describe how the .NET thread pool works and when you would use async/await vs raw Thread vs ThreadPool.
Behavioral (2)
Microsoft asks about "growth mindset". Tell me about a significant technical failure you experienced. What did you learn and how did you change your approach as a result?
Describe a time you had to learn a completely unfamiliar codebase or technology quickly to unblock a critical deliverable. How did you approach it?
DSA / Graphs (1)
Given a 2D grid of 0s and 1s, count the number of islands. Then extend: find the largest island, and then explain how you would solve this for a streaming grid that changes in real time using a Union-Find structure.
AI / Agents (1)
You are building an AI agent that books travel. It has access to 6 tools. How do you prevent it from calling tools in the wrong order or entering infinite loops?
React / React 19 (1)
What is React 19 use() hook and how does it change async data fetching compared to useEffect?
TypeScript / Types (1)
Explain the difference between a TypeScript interface and a type alias. Give a concrete case where only one of them can express what you need.
System Design / Collaboration (1)
Design the "presence" feature in Teams/Slack — showing whether a user is online, away, or in a meeting — that scales to tens of millions of concurrent users with near real-time updates.
DSA / Design (1)
Design a data structure that supports insert, delete, and getRandom in O(1) average time. Walk through your approach.
C# / Async (1)
In C#, what is the difference between Task.Wait() and await? Why does calling .Wait() on the UI thread risk a deadlock in a way that await does not?
Java / Streams (1)
Rewrite this imperative loop using Java Streams: filter a list of orders for status "PAID", then sum their amounts. Explain one case where a stream would actually perform worse than the loop.
Python / Decorators (1)
Write a Python decorator @timed that prints how long a function took to execute, and explain how functools.wraps prevents it from breaking introspection.
System Design / Notifications (1)
Design a notification system that can send push, email, and SMS, where a user's preferences determine which channels are used, and a failed channel should fall back to another.
Practice these questions with AI feedback
Get instant grading on your answers, identify your weak areas, and generate a personalised 14-day study plan — all free.
Build my study plan →