641 questions · from 150 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
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
- 18
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
- 19
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
- 20
Array Cost Minimization with One Insertion
Given an array of integers, define the cost as the sum of the squares of the differences between each pair of consecutive elements, i.e., cost = Σ (arr[i] - arr[i‑1])² for i ≥ 1. You are allowed to perform exactly one move: insert any integer value at any…
- 21
Word Search (LeetCode 79)
Given a 2‑D board of characters and a word, determine if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring. The same cell may not be used more…
Medium · From My Microsoft On-Campus Internship Interview Experience
- 22
Racer Ordering from Pairwise Finish Information
You are given a list of tuples (a, b) where each tuple denotes that racer a finishes before racer b in a race. Based on this information, answer three questions: 1. Is the data valid? – i.e., does the set of relations contain any cycles that would make the…
- 23
Longest Repeating Character Replacement (Variation)
Given a string, find the length of the longest substring where you can replace at most k characters to make all characters in the substring identical. The interview asked a variation of this classic problem.
Medium · From SDE 2 Microsoft Interview Experience
- 24
Alien Dictionary
Given a list of words sorted lexicographically according to an alien language, determine the order of characters in the alien alphabet.
Hard · From Microsoft L61 - SE - HackerRank Live Coding
- 25
Expression Evaluator
The question was to design an Expression Evaluator. Given a mathematical expression containing: - +, -, , / - Parentheses - Multi-digit integers - Spaces - Unary + / - The evaluator had to return the integer result while respecting standard operator…
279 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
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.
- 08
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.
- 09
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 -…
- 10
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…
- 11
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
- 12
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
- 13
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…
- 14
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.
- 15
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.
- 16
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
- 17
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
- 18
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…
- 19
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.
- 20
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 &…
- 21
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…
- 22
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),…
- 23
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.…
- 24
Design Multi-Module Logging Framework
There are controllers which has module 1, module2, module 3, need to design logging capability framework for the complete system. When module1/2/3 has done some activity it will send log data to your framework. and framework should log to a file/any tool as a…
- 25
Design Three-Thread Data Exchange (R/W)
Need to write a code write a three-thread and data should be exchanged b/w all these 3 threads and basically a R/W operation, how i can approach it
170 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
Implement Linux `cp` Command
Implement the core functionality of the Linux cp command, handling file copying, metadata preservation, permission checks, and efficient data transfer.
- 02
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
- 03
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
- 04
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
- 05
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
- 06
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
- 07
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
- 08
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
- 09
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
- 10
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
- 11
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?
- 12
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?
- 13
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?
- 14
Process vs Thread
What is the difference between a process and a thread?
- 15
Multiple Threads Reading Same Variable
If multiple threads access the same variable and they don’t write to it, do we face any problem?
- 16
Issues with Multiple Threads Accessing Shared Variable
What issues arise when multiple threads access a shared variable?
- 17
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?
- 18
Causes of Race Conditions
What exactly causes race conditions in multithreaded programs?
- 19
C++ Fundamentals Discussion
Questions on C++ standards, including STL, memory management, and modern C++ features.
- 20
Code Review on Python File
I was given a Python file with a few functions and asked to review it.
- 21
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.
- 22
Sorting Algorithms and Time Complexities
I had discussions around different sorting algorithms and their time complexities.
- 23
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
- 24
TCP vs UDP
Explain the key differences between TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).
- 25
65 more in the Microsoft write-ups.
Microsoft interview questions FAQ
What questions are asked in Microsoft interviews?
Candidates reported 641 distinct questions across 150 Microsoft interviews. 304 coding and DSA questions, 195 system design questions, 52 behavioural and HR questions, 90 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, 54% medium and 36% hard.