650 questions · from 153 interviews · 25 asked more than once
Microsoft interview questions
Every question candidates reported from their Microsoft interviews, most frequently asked first. Each links to the write-up it came from, so you can see the round and how it went.
Microsoft coding and DSA questions
- 01
Asteroid Collision
You are given an array of integers representing asteroids moving along a one‑dimensional line. Positive numbers move to the right, negative numbers move to the left. When two asteroids moving in opposite directions meet, the smaller (in absolute value) one…
Asked 2 times · From My Microsoft On-Campus Internship Interview Experience
- 02
Implement LRU Cache
I was asked to implement an LRU (Least Recently Used) Cache on the whiteboard.
Medium · Asked 2 times · From Microsoft L65 Interview Experience
- 03
Meeting Rooms II
Given an array of meeting time intervals consisting of start and end times, find the minimum number of conference rooms required. I was asked to discuss and implement solutions. We explored three approaches: Priority Queue, Two-Pointer, and an Array-based…
Medium · Asked 2 times · From Microsoft - SDE II Interview experience
- 04
Valid Parentheses
I solved a problem similar to validating parentheses, which involved stack usage, recursion, and backtracking, along with a clear explanation of trade-offs.
Easy · Asked 2 times · From Interview Experience - Microsoft SDE 2(L61) | Hyderabad
- 05
Number of Islands
Given an m x n 2D binary grid which represents a map of '1's (land) and '0's (water), return the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the…
Medium · Asked 2 times · From Microsoft | SDE 2 | Interview Experience | Hyderabad | Rejected
- 06
Rotting Oranges
Rotting Oranges
Medium · Asked 2 times · From Microsoft | Senior Software Engineer (SSE) | L63 | India | Dec 2025 | Selected
- 07
Longest Safest Path in String with Blockers
You are given a string with lowercase letters and hashes. A hash is considered a blocker. Find the longest safest path in that string. Follow up: What if we allow one hash to be considered safe.
Asked 2 times · From Microsoft Interview Experience || SDE 1 (L60) Noida
- 08
Palindrome Linked List
Check if a given linked list is a palindrome.
Medium · Asked 2 times · From Microsoft Interview Experience | SDE-II | Offer Received
- 09
Gas Station Problem
Asked for the brute-force approach for the Gas Station problem. Coded it live and discussed time complexity and potential optimizations.
Medium · Asked 2 times · From Microsoft | SWE internship | March 2025
- 10
Populating Next Right Pointers in Each Node
I was asked to solve the problem of connecting next right pointers in each node of a perfect binary tree.
Medium · Asked 2 times · From Microsoft L61 | In person drive | Accepted
- 11
Spiral Matrix
Given an m x n matrix, return all elements of the matrix in spiral order.
Medium · Asked 2 times · From Microsoft Recent SDE2 DSA Queations
- 12
3Sum
Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0. Notice that the solution set must not contain duplicate triplets.
Medium · Asked 2 times · From Microsoft Recent SDE2 DSA Queations
- 13
String Reconstruction in Grid
Given a string s and an NxN grid of characters, reconstruct s by visiting grid fields. The grid contains empty fields (".") or uppercase English letters, with each letter appearing at most twice. Rules: - Start with an empty string and choose any starting…
Asked 2 times · From Microsoft | L60 | Interview Experience | Bengaluru | Offer | February 2025
- 14
Set Matrix Zeroes
Given an m x n integer matrix, if an element is 0 , set its entire row and column to 0 's.
Medium · Asked 2 times · From Microsoft | 2020 | SDE-2 | L-61
- 15
Cousins in Binary Tree
Given the root of a binary tree and the values of two distinct nodes, x and y , determine if they are cousins. Two nodes are cousins if they have the same depth but different parents.
Asked 2 times · From Microsoft | L61 | Noida | Reject
- 16
Two Sum
Given an array of integers nums and an integer target , return indices of the two numbers such that they add up to target . You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer…
Easy · Asked 2 times · From Microsoft | SDE1 | Bangalore, India | New Grad | Jan 2022 [Result Awaiting]
- 17
Compute total with tiered/progressive rate table
Given a set of tiers that define progressive rates (similar to tax brackets), compute the total amount for a value. The tiers are provided at runtime as a list of ranges with associated rates. The solution must handle large numbers of queries efficiently,…
Medium · From Microsoft SWE II, Frontend, Oct 2026
- 18
Minimum‑count variant of exact total (DP) problem
Given a set of sizes (e.g., coin denominations), determine the minimum number of items required to make an exact total. Return -1 if it is impossible. Watch out for integer overflow in the DP array.
Medium · From Microsoft SWE II, Frontend, Oct 2026
- 19
Balance Chemical Equation Using SymPy
Write a Python program using SymPy that balances a chemical equation. An equation is balanced when the number of atoms of each element is the same on both sides. Given an unbalanced equation, return the list of coefficients of the balanced equation, in the…
From Microsoft Data Science INTERN | 2027 Summer | OA Questions
- 20
Minimum Operations to Make a String Beautiful
A string is beautiful if no two adjacent characters are either the same or adjacent in the alphabet. One operation lets you pick any index i and change s[i] to any lowercase English letter. Return the minimum number of operations needed to make the string…
From Microsoft Data Science INTERN | 2027 Summer | OA Questions
- 21
Mini CSS Query Selector Engine
Design and implement a mini CSS query selector engine. The problem involves parsing simple CSS selectors and traversing an HTML-like DOM tree to find matching elements. The candidate recognized it as a classic tree traversal problem and proposed a DFS…
From Microsoft SDE-2 | Interview Experience | 3 YOE | Offer Received
- 22
Min/Max Stack with Thread Safety
Implement a stack that supports retrieving the minimum (and later the maximum) element in constant time. After implementing the basic Min‑Stack, the interviewer asked follow‑up questions to add Max‑Stack functionality, make the implementation thread‑safe, and…
From Microsoft SDE-2 | Interview Experience | 3 YOE | Offer Received
- 23
Maximum Consecutive Ones III
Given a binary array, find the maximum number of consecutive ones when at most K zeros can be flipped.
Medium · From Microsoft Interview Experience | 3+ Years Experience | System Design, OOD & DSA | Rejected
- 24
Amount of Time for Binary Tree to Be Infected
Given a target node in a binary tree, compute the time required for an infection (or fire) to spread to the entire tree, where the infection spreads to adjacent nodes (left child, right child, and parent) each minute.
Medium · From Microsoft Interview Experience | 3+ Years Experience | System Design, OOD & DSA | Rejected
- 25
Message Rate Limiter with Variable Window
Given a sequence of log messages with their timestamps and an integer K , return a boolean list indicating for each message whether it should be accepted (true) or suppressed (false). A message is accepted only if the same message has not been accepted in the…
Medium · From Microsoft Interview Experience | 3+ Years Experience | System Design, OOD & DSA | Rejected
285 more in the Microsoft write-ups.
Microsoft system design questions
- 01
Design a Rate Limiter
Design a rate Limitter & general questions regarding server debugging like logs, monitoring etc
Asked 3 times · From Microsoft SDE2 Interview Experience
- 02
Design an Elevator System
I was asked to design an Elevator System, focusing on Object-Oriented Design principles. My task was to define requirements, outline classes and their functions, and explain the application of OOP principles like SRP and encapsulation.
Asked 3 times · From Microsoft Software Engineer II Interview Experience | EU | On-side | Rejection.
- 03
Design an Alert Monitoring System
Design an Alert Monitoring System. Requirements: The system monitors multiple machines, each equipped with various sensor types (e.g., Temperature, Pressure). Each sensor has a defined lower and upper threshold. If a value falls outside this range, an alert…
Asked 2 times · From Interview Experience: Microsoft | SDE 2
- 04
Design Rate Limiter
A standard HLD question to design a Rate Limiter. I discussed the requirements, explained different algorithms, components, and discussed scalability and reliability. This round also included some situational behavioral questions.
Asked 2 times · From MIcrosoft | SDE-2 | Interview
- 05
Design URL Shortener
Design a URL Shortener. I was expected to explain this with multiple solution approaches, discuss trade-offs, and walk through the core logic and algorithms.
Hard · Asked 2 times · From Microsoft Interview Experience | SDE-II | Offer Received
- 06
Design Chess Game
I had to design a Chess Game, focusing on modularity and extensibility. Follow-up questions included handling AI vs Human scenarios.
Hard · Asked 2 times · From My Microsoft Interview Experience - SDE2 (Total Experience ~3 years)
- 07
Frontend/UX system design for financial records dashboard
Design an internal web application where employees can view personal financial records. The app should provide a summary view and a long, searchable history. Assume tens of thousands of users, each with thousands of records. Discuss dashboard layout, table…
Medium · From Microsoft SWE II, Frontend, Oct 2026
- 08
Design Spotify‑like Music Player System
Design a music player system similar to Spotify. Discuss requirements such as song shuffling, state management (play, pause, skip), offline capabilities, and scalability considerations. The candidate outlined core entities, class design, and key features.
From Microsoft SDE-2 | Interview Experience | 3 YOE | Offer Received
- 09
Design a Notification System for Windows
Design a notification system for the Windows platform where different applications can generate and display notifications to the user. Consider APIs, priority handling, persistence, and how the system interacts with the OS shell.
- 10
Proximity Search for Food Delivery
Design a service that, given a user's location, returns restaurants within a 10 km radius for a food‑delivery use case. Address indexing, geo‑spatial queries, scalability, and real‑time updates.
- 11
Library Management System Design
Problem: Design a Library Management System. The discussion covered: - Identifying the core entities - Defining classes and their responsibilities - Relationships between entities - Borrowing and returning books - Handling different types of users/books -…
- 12
E‑commerce Shopping System Design
Problem: Design an E‑commerce Shopping System. Requirements included: - Product search, filtering and sorting - Viewing product details - Purchasing products - Secure checkout - Integration with an existing Inventory Management System through APIs - Scale…
- 13
Design Configuration Service for Microservices
Design a high‑level configuration service responsible for updating configurations across an arbitrary number of microservices in an architecture. Discuss components, data flow, consistency, and scalability considerations.
From Microsoft Senior SE (L63/L64) Interview Experience | March 2026
- 14
Design a File System (Storage Basics)
Design a file system focusing on low‑level storage details: how a file is saved on disk, which underlying data structures (e.g., bitmap) are used to track free space, and how the system manages allocation and deallocation of blocks.
From Microsoft Senior SE (L63/L64) Interview Experience | March 2026
- 15
Search Service for Document Lines
Implement a service that, given a document, returns the lines matching a user query. Example: Document contains "Delhi is the capital of India and has good food." Query "Delhi has good food" should return the line. Follow‑up: after returning results, the user…
- 16
KV Store with Expiry and LRU Cache
Design a key‑value store supporting get , put , del operations. Follow‑ups: each key has an expiry time; handle race conditions during deletions caused by expiry; later extend the design to include an LRU cache with expiry.
- 17
Implement N Stacks Using a Fixed‑Size Array
Design a data structure that can simulate N independent stacks using a single array of fixed size.
- 18
Low‑Level Design: Vending Machine / Parking Lot
Design either a Vending Machine or a Parking Lot system. Discuss class responsibilities, apply SOLID principles, and choose appropriate design patterns such as State or Strategy to make the code extensible and maintainable.
From Microsoft Interview Experience | SDE 2 (L61/L62) | India | 2026
- 19
High‑Level Design: Distributed Key‑Value Store
Design a distributed key‑value store similar to Redis. Cover data sharding, replication strategies, and the trade‑offs between consistency and availability, as well as overall system architecture.
From Microsoft Interview Experience | SDE 2 (L61/L62) | India | 2026
- 20
System Design for Real-time Anomaly Detection
Scenario: You are receiving a streaming time-series data feed and need to detect anomalies. The constraints are extreme: it is highly latency-sensitive, and data arrives at 10,000 samples per second. Question: What is the optimal architectural design for…
- 21
Design High-Level Architecture for Microsoft Bing Ads
I was asked to design a high-level architecture similar to Microsoft Bing Ads. This included campaign setup & management, budget pacing, ranking logic & quality score, auction mechanism, publisher integration via SSP, and the end-to-end ads delivery flow.
- 22
Design Search API for Local Services
I needed to design an API for the search query: 'Plumbers near Kondapur'. Discussion points included data ingestion pipeline, indexing (inverted index + geo-spatial indexing), semantic matching, hybrid retrieval (BM25 + embeddings), ranking signals &…
- 23
Design a Payment Gateway System (Razorpay-like)
I designed a payment gateway system similar to Razorpay. This involved detailing the payment flow (App → Gateway → Bank, OTP handling, 3DS flow, Callback/webhook handling), reliability & safety considerations (Idempotency keys, Retry mechanisms, Handling bank…
- 24
Design Website Activity Analytics System
The requirement was to design a system to track clicks/actions/users with an 18-month lookback and 5-minute granularity, allowing filtering by language, country, and other attributes. Discussion points included event-based schema (fact + dimension tables),…
- 25
Design Data Access Layer with Runtime Source Change
I have data retrieval and update operations. The challenge is that the data source can change at runtime (for example, database, API, or file). I want to design the data access layer in a way that it remains loosely coupled from the underlying data source.…
172 more in the Microsoft write-ups.
Microsoft behavioural and HR questions
- 01
- 02
Strengths and Weaknesses
Discuss strengths and weaknesses from the perspective of my manager, peers, and myself.
Asked 2 times · From Microsoft India Senior Software Engineer L63
- 03
Behavioral Questions
I faced standard behavioral questions such as 'how do you handle conflicts,' 'describe an instance where you helped your team,' 'why are you looking for a change,' and 'what opportunities do you expect from Microsoft'.
Asked 2 times · From Microsoft | SDE 2 (UI) | Bangalore (India) | March 2022 | Offer
- 04
Complex Project End-to-End Ownership
Complex project like end to end ownership
- 05
Non-Technical Skill for Improvement
What is one non-technical skill you want to become better at?
- 06
Disagreement with Manager and Teammates
Disagreement with manager and teammates
- 07
Reason for Job Change
Why are you looking for a change?
- 08
AI Tools in Projects
How are AI tools helping you in your projects?
- 09
Discuss Non-Technical Feedback Received
I was asked to discuss any non-technical feedback I had received.
From Microsoft | SWE-II
- 10
Behavioral: Team Dynamics
Discussed team size, how work is split, ownership, and collaboration style during the behavioral interview.
From Sharing my failure at Microsoft Hiring Event [BQ + Coding + Design]
- 11
Behavioral: Delivering with Ambiguity
Provide an example of delivering a project or task with little guidance. There were many deep follow-up questions regarding prioritization, rollout strategies, and A/B testing.
From Sharing my failure at Microsoft Hiring Event [BQ + Coding + Design]
- 12
Behavioral Questions: Collaboration, Ownership, Impact
The round concluded with discussions around Microsoft team’s business problems, expectations from the role, and behavioral questions focusing on collaboration, ownership, and impact.
From Interview Experience - Microsoft SDE 2(L61) | Hyderabad
- 13
Handling Customer Issues and Conflict Resolution
Behavioral and scenario-based questions covering how to handle critical customer issues and high-pressure escalations, and conflict resolution within a team.
- 14
Most Technically Challenging Issue
What was the most technically challenging issue you’ve faced? Follow-up: How did you make sure it wouldn’t happen again?
- 15
Why Are You Looking for a Change?
Why are you looking for a change?
- 16
Influencing Without Authority
How would you influence someone when you’re not in a position of authority (i.e., leading without being a manager)?
- 17
Past Projects Discussion
Discussion regarding my past projects and experience.
From Microsoft | SDE 2 | Interview Experience | Noida | Rejected
- 18
Motivation for Changing Jobs
What is your motivation for changing jobs?
From Microsoft | Senior Software Engineer (SSE) | L63 | India | Dec 2025 | Selected
- 19
Why Not Move Within Current Organization?
Why not move within your current organization?
From Microsoft | Senior Software Engineer (SSE) | L63 | India | Dec 2025 | Selected
- 20
Expectations from Microsoft
What do you expect from Microsoft?
From Microsoft | Senior Software Engineer (SSE) | L63 | India | Dec 2025 | Selected
- 21
Instance of Failure and Handling
Tell me one instance where you failed to do what you were supposed to do — and how you handled it.
From Microsoft | Senior Software Engineer (SSE) | L63 | India | Dec 2025 | Selected
- 22
Behavioral Questions on Projects and Experiences
Standard behavioral questions were asked, focusing on my project work, hackathon experiences, and general scenario-based questions that could be answered using the STAR technique.
- 23
Behavioral and Managerial Questions
This round focused on behavioral and managerial aspects. Questions included topics such as my previous experiences and projects, my reasons for wanting to join Microsoft, my biggest achievement, what I would improve in my previous company if given the power,…
- 24
Behavioral and Leadership Questions
General questions focusing on leadership principles, past project experiences, and problem-solving approaches in various professional scenarios.
- 25
Standard Behavioral Questions
I encountered standard behavioral questions, such as discussing my strengths and weaknesses and what I am doing to improve them.
From Microsoft DS 2 Interview Experience | Selected waiting for offer.
27 more in the Microsoft write-ups.
Microsoft other questions
- 01
SQL join with effective date ranges using window functions
Join a transactions table with a rates table that only contains a startdate for each rate. For each transaction, determine the applicable rate by deriving the rate's effective end date using window functions, then calculate the total value per day in a single…
Hard · From Microsoft SWE II, Frontend, Oct 2026
- 02
Implement Linux `cp` Command
Implement the core functionality of the Linux cp command, handling file copying, metadata preservation, permission checks, and efficient data transfer.
- 03
Thompson sampling vs. epsilon‑greedy
Explain the differences between Thompson sampling and epsilon‑greedy in reinforcement learning, and discuss the explore vs. exploit trade‑off.
From Microsoft Senior Applied Scientist (L63) Interview Experience
- 04
Calibration with Platt scaling
Describe how Platt scaling works for calibrating the probabilities of a binary classifier.
From Microsoft Senior Applied Scientist (L63) Interview Experience
- 05
Handling imbalanced data via downsampling
How would you handle an imbalanced dataset by downsampling the majority class?
From Microsoft Senior Applied Scientist (L63) Interview Experience
- 06
Offline metrics higher than online metrics
Why might offline evaluation metrics be higher than online (A/B test) metrics, and how would you address this discrepancy?
From Microsoft Senior Applied Scientist (L63) Interview Experience
- 07
Data drift: covariate shift vs. label drift
Differentiate between covariate shift and label drift as forms of data drift, and explain how each can be detected.
From Microsoft Senior Applied Scientist (L63) Interview Experience
- 08
Statistical tests for drift detection
What statistical tests can be used to detect data drift in a production ML system?
From Microsoft Senior Applied Scientist (L63) Interview Experience
- 09
Cold start problem for new ads
Explain the cold‑start problem when introducing new advertisements into a recommendation system and possible mitigation strategies.
From Microsoft Senior Applied Scientist (L63) Interview Experience
- 10
BERT vs. GPT architectures
Compare the architectures of BERT and GPT models, highlighting key differences in design and typical use‑cases.
From Microsoft Senior Applied Scientist (L63) Interview Experience
- 11
Off‑policy learning from logged data
Given logged data generated by an old policy, how would you train a new model to update the policy (off‑policy learning)?
From Microsoft Senior Applied Scientist (L63) Interview Experience
- 12
Data Quality & Outliers Handling
In a given dataset, some feature values are extremely large. How do you handle them? Do you remove, retain, or transform them? Follow-up: What are other critical data quality issues you have faced in production systems?
- 13
Feature Engineering for Customer Churn Prediction
Scenario: You are working for a subscription service experiencing high customer attrition (churn). Question: What are the top 5 features you would engineer to predict user churn?
- 14
Metrics & Loss Functions for False Negative Sensitive Tasks
How do you handle tasks that require strict attention to False Negatives (e.g., fraud or disease detection)? What specific performance metric do you optimize for?
- 15
Process vs Thread
What is the difference between a process and a thread?
- 16
Multiple Threads Reading Same Variable
If multiple threads access the same variable and they don’t write to it, do we face any problem?
- 17
Issues with Multiple Threads Accessing Shared Variable
What issues arise when multiple threads access a shared variable?
- 18
Heap vs Stack Variables & Thread Conflicts
What is the difference between a variable created on the heap and a variable created inside a function? If multiple threads execute the same function, and each thread has its own function-local variables, then how do conflicts arise at all?
- 19
Causes of Race Conditions
What exactly causes race conditions in multithreaded programs?
- 20
C++ Fundamentals Discussion
Questions on C++ standards, including STL, memory management, and modern C++ features.
- 21
Code Review on Python File
I was given a Python file with a few functions and asked to review it.
- 22
Design Car Types with Inheritance
I was asked to code different car types (low, mid, high end) using object-oriented programming principles, specifically focusing on inheritance.
- 23
Sorting Algorithms and Time Complexities
I had discussions around different sorting algorithms and their time complexities.
- 24
String Manipulation Problem
A coding problem focused on strings, where the candidate was expected to walk through edge cases, time complexity, and write a clean solution with test cases.
From Microsoft SDE Intern Interview Experience Round 2 (Core CS Track) — My Journey
- 25
TCP vs UDP
Explain the key differences between TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).
66 more in the Microsoft write-ups.
Microsoft interview questions FAQ
What questions are asked in Microsoft interviews?
Candidates reported 650 distinct questions across 153 Microsoft interviews. 310 coding and DSA questions, 197 system design questions, 52 behavioural and HR questions, 91 other questions.
Which Microsoft interview questions are asked most often?
The most repeated are "Why Microsoft?" (3 times), "Design a Rate Limiter" (3 times), "Design an Elevator System" (3 times), "Asteroid Collision" (2 times), "Implement LRU Cache" (2 times).
How difficult are Microsoft interview questions?
Of the questions candidates rated, 10% were easy, 55% medium and 36% hard.