Microsoft Software Engineer Coding & Algorithms Interview Questions
Practice 79 real Coding & Algorithms interview questions for Software Engineer roles at Microsoft.

"I got asked a hardcore MCM DP question and I saw it on PracHub as well. Solved that question in 5 minutes. Without PracHub I doubt I could solve it in 5 hours. Though somehow didn't get hired, perhaps I guess I solved it too fast? /s"

"Believe me i'm a student here jn US. Recently interviewed for MSFT. They asked me exact question from PracHub. I saw it the night before and ignored it cause why waste time on random sites. I legit wanna go back and redo this whole thing if I had chance. Not saying will work for everyone but there is certainly some merit to that website. And i'm gonna use it in future prep from now on like lc tagged"

"10 years of experience but never worked at a top company. PracHub's senior-level questions helped me break into FAANG at 35. Age is just a number."

"I was skeptical about the 'real questions' claim, so I put it to the test. I searched for the exact question I got grilled on at my last Meta onsite... and it was right there. Word for word."

"Got a Google recruiter call on Monday, interview on Friday. Crammed PracHub for 4 days. Passed every round. This platform is a miracle worker."

"I've used LC, Glassdoor, and random Discords. Nothing comes close to the accuracy here. The questions are actually current — that's what got me. Felt like I had a cheat sheet during the interview."

"The solution quality is insane. It covers approach, edge cases, time complexity, follow-ups. Nothing else comes close."

"Legit the only resource you need. TC went from 180k -> 350k. Just memorize the top 50 for your target company and you're golden."

"PracHub Premium for one month cost me the price of two coffees a week. It landed me a $280K+ starting offer."

"Literally just signed a $600k offer. I only had 2 weeks to prep, so I focused entirely on the company-tagged lists here. If you're targeting L5+, don't overthink it."

"Coaches and bootcamp prep courses cost around $200-300 but PracHub Premium is actually less than a Netflix subscription. And it landed me a $178K offer."

"I honestly don't know how you guys gather so many real interview questions. It's almost scary. I walked into my Amazon loop and recognized 3 out of 4 problems from your database."

"Discovered PracHub 10 days before my interview. By day 5, I stopped being nervous. By interview day, I was actually excited to show what I knew."

"I recently cleared Uber interviews (strong hire in the design round) and all the questions were present in prachub."
"The search is what sold me. I typed in a really niche DP problem I got asked last year and it actually came up, full breakdown and everything. These guys are clearly updating it constantly."
Solve cache, grid path, and substring problems
This multipart question evaluates algorithmic problem-solving and data structure design skills, covering a capacity-bounded cache with eviction behavi...
Fill rooms with nearest-gate distance
You are given an m×n grid representing a building floor plan: - -1 = wall/blocked cell - 0 = gate - A large positive number (e.g., INF = 2^31-1) = emp...
Build a time-based key-value store
Problem Design a data structure that stores multiple values for the same key at different timestamps, and can retrieve the most recent value as of a g...
Determine dictionary-based string segmentation
You are given a string s and a set of tokens dict. Determine whether s can be segmented into a sequence of one or more tokens from dict. If segmentati...
Implement a generic tree Node class
Design and implement a Node class for a mutable rooted tree. Requirements: store value, parent, and ordered children; support add_child, remove, move_...
Merge multiple sorted arrays using min-heap
Problem You are given k sorted arrays of integers: - arrays[0], arrays[1], ..., arrays[k-1] - Each arrays[i] is sorted in non-decreasing order. - The ...
Assemble DNA payload strings from tagged fragments
You are given a list of DNA-like fragments. Each fragment is a tuple: - start_tag: string - end_tag: string - payload: string A valid DNA chain is for...
Implement a type-based mutex for tasks
This question evaluates understanding of concurrency and synchronization primitives, testing the ability to design a thread-safe type-based mutex that...
Reconstruct DNA from tagged fragments
This question evaluates understanding of sequence reconstruction, graph modeling, and traversal/orientation constraints, focusing on ordering labeled ...
Count integer pairs satisfying 1/x + 1/y = 1/N
You are given a positive integer N (\(1 \le N \le 10^6\)). Consider the Diophantine equation: \[ \frac{1}{x} + \frac{1}{y} = \frac{1}{N}, \] where x a...
Implement Matrix Move and Logger
This question evaluates array manipulation and in-place algorithm design for handling overlapping submatrix moves, along with data-structure and time-...
Maximize profit with bounded sell window
Given an array prices[0..n-1] of daily stock prices and an integer D ≥ 1, you may perform at most one transaction (buy then sell). The sell day j must...
Implement interval room counter and token manager
You are given two coding questions. 1) Minimum number of rooms for time intervals You are given a list of meetings, where each meeting is an interval ...
Remove duplicates in-place from unsorted array
This question evaluates understanding of in-place array manipulation, duplicate removal, and algorithmic analysis under strict extra-space constraints...
Implement idempotent request handling with idempotency keys
This question evaluates understanding of idempotency semantics, idempotency-key handling, concurrency control, synchronization, and in-memory TTL-base...
Decode a JWT string without libraries
This question evaluates understanding of JWT structure, Base64URL encoding, string manipulation, and JSON parsing as applied to decoding token compone...
Reverse linked list in fixed-size groups
Problem You are given the head of a singly linked list and an integer k (k >= 1). Reverse the nodes of the list in-place in groups of size k: - The no...
Solve three scheduling and array problems
In this round you are given three separate coding problems to solve. --- Problem 1: Schedule tasks with cooldown You are given: - A list of tasks, whe...
Design cache with least-recently-used eviction
You are asked to design an in-memory key–value cache that supports a least-recently-used (LRU) eviction policy. The cache must support the following o...
Build a CSV Query Engine
This question evaluates proficiency in text parsing, data modeling, and implementing in-memory query semantics, including CSV parsing rules, type infe...