Microsoft interview questions

Tech / SWE · 10 questions
Report an interview →

Browse 10 Microsoft interview questions for software engineering and software development interview preparation. Questions in this collection are tagged for full-time roles. Explore the topics and stages below and filter the collection to plan your practice.

Interview stages in this collection
Phone screen, Onsite, Online assessment (OA)
Practice topics
Array (6), Dynamic Programming (3), String (3), Two Pointers (3), Divide and Conquer (2), Hash Table (2), Sorting (2), Stack (2)

Questions come from candidate contributions and online research. Reports reflect past experiences and do not guarantee what Microsoft will ask. Locked question details require points. Public examples below are free to read.

Read 3 free Microsoft interview question examples

Browse all Microsoft questions

10 questions

Free Microsoft interview question examples

Read the full problem statements and use the links to revisit or share a specific example.

Longest Substring

Medium · Phone screen · Onsite · Full-time

Pretty standard sliding window question from my Microsoft phone interview. Find the length of the longest substring without any repeating characters. I used a hash map to track the last index of each character and moved the left pointer forward whenever I hit a duplicate. The interviewer probed edge cases like an empty string, a string with all identical characters, and asked about the space complexity when the character set is ASCII versus Unicode.

Merge Sorted Array

Easy · Online assessment (OA) · Phone screen · Onsite · Full-time

Quick warm-up in my Microsoft loop. Merge two sorted arrays in-place where the first array has enough space at the end for the second. I started from the back filling in the largest elements first, which avoids overwriting anything. The interviewer asked why starting from the front would be problematic and whether the approach changes if one array is much larger than the other. Simple problem but they cared about clean code and clear variable naming.

Two Sum

Easy · Online assessment (OA) · Phone screen · Onsite · Full-time

First question in my Microsoft phone interview, clearly meant as a warm-up. Given an array and a target, find two numbers that add up to it and return their indices. Did it with a single-pass hash map. The interviewer then asked how I'd handle it if the array was sorted, and whether I could do it without extra space in that case. They also asked what changes if there are multiple valid pairs and you need to return all of them.