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."
Implement a sliding-window rate limiter allow()
This question evaluates understanding of sliding-window rate limiting, time-windowed counting, and per-user state management for high-throughput servi...
Implement a Snapshot Set Iterator
Implement a data structure SnapshotSet<T> with the following interface: `java interface SnapshotSet<T> { void add(T e); void remove(T e); ...
Compute shortest path in cyclic graph
This question evaluates understanding of graph algorithms and shortest-path computation in weighted directed graphs, including handling cycles, non-ne...
Extract stream prefix before stop token
This question evaluates streaming string processing, incremental substring detection across chunk boundaries, and memory-efficient algorithm design fo...
Design a Versioned Key-Value Store
This question evaluates understanding of time-versioned data structures, temporal indexing, and efficient lookup strategies for storing and retrieving...
Solve power jumps and graph tour
This pair of problems evaluates algorithmic problem-solving in number representation and combinatorial graph optimization, focusing on competencies in...
Solve binary-tree reverse printing and LPS
You are given a binary tree node definition: - TreeNode { int val; TreeNode left; TreeNode right; } Answer the following two algorithmic questions. 1)...
Implement Calendar, Tokenizer, and Meeting Optimizer
This question evaluates competencies in interval scheduling and overlap detection, custom string tokenization and parsing rules, and combinatorial opt...
Compute distance of each node to a cycle
This question evaluates proficiency in graph algorithms, including understanding unicyclic graph structure, cycle identification, and computing minimu...
Find maximum collinear points
This question evaluates understanding of planar geometry and algorithmic reasoning for identifying collinearity, including handling duplicate points a...
Compute product of array except self
This question evaluates understanding of array manipulation, modular arithmetic, and algorithmic optimization by requiring computation of per-element ...
Check palindrome and find next larger palindrome
This question evaluates proficiency in string and numeric manipulation, specifically palindrome detection and generation of the next strictly larger n...
Determine most popular concert city
Determine most popular concert city Given a set of concert venue vote records, determine which city is the most popular. How would you normalize city ...
Compute discounted prices and full-price indices
You are given an array prices of length \(n\). Items are sold from left to right, and each item’s final selling price is computed as follows: For item...
Find all balanced k in a permutation
You are given a permutation \(p\) of length \(n\) containing each integer from \(1\) to \(n\) exactly once. For each \(k\) where \(1 \le k \le n\), de...
Check palindrome number and next palindrome
This question evaluates understanding of numeric and string manipulation along with algorithmic problem-solving for palindrome detection and generatio...
Validate a JSON-like string
This question evaluates parsing and string-processing skills, focusing on structural validation of JSON-like text including matching and nesting of br...
Merge overlapping intervals
You are given an array of intervals, where each interval is represented as a pair of integers [start, end] with start <= end. The intervals may be uns...
Assemble async stream reads into objects
This question evaluates a developer's skill in asynchronous stream I/O, buffer management, and binary parsing in C#, including correctly handling part...
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...