InterviewLegend

Microsoft Software Engineer (SDE) Coding Interview

Alex Chen12 min readUpdated 1,382 real interview reports
In this lesson
  • See how broad and medium-difficulty the Microsoft SDE coding round is, and which classics recur across years and geographies
  • Learn the recurring patterns and their example problems, so you skip grinding the whole tag list
  • Know how the bar shifts at SDE II, and what the phone screen, OOD/LLD round, and online assessment add
  • Understand the bar the room actually grades: clean, readable, tested code that runs, valued over the clever one-liner

The Microsoft software engineer interview is broad but not deep. The SDE coding loop spans arrays and strings, trees and linked lists, graphs, dynamic programming, and design-a-data-structure, at LeetCode easy-to-medium, with genuine LC-hard rarer than at Google or Meta. Three things make it Microsoft's own: a first-class object-oriented design (OOD/LLD) round, a separate online-assessment problem bank, and more OS and threading than peers. The bar is clean, readable, tested code that runs, valued over the clever one-liner.

The coding rounds cover a lot of ground without going especially deep. Questions range across the whole pattern map: arrays and strings, trees and linked lists, graphs, dynamic programming, and design-a-data-structure. They sit at LeetCode easy to medium, and genuine LC-hard shows up less than it does at Google or Meta. The breadth is real, so you cannot skip a pattern, but the depth on any one problem stays human. That holds whether you are interviewing for SDE (the entry level) or SDE II (the broad mid-level band most engineers sit in). What changes with level is the design round and the story you tell, not the coding difficulty.

What is the Microsoft software engineer interview?

The Microsoft software engineer interview is a same-day loop of four or five 45-minute rounds. It is usually preceded by a recruiter screen and, depending on your org, either an online assessment or a technical phone screen. The loop mixes two or three coding rounds with an object-oriented design round, and every round opens with a short behavioral block. The coding bar sits at classic medium difficulty. The full process is broken down here.

Under that breadth sits a stable classic core. A small set of problems keeps coming back, year after year, whether the loop ran in Redmond, Bangalore, or Hyderabad. A Premium question is the standout, asked so often it is effectively a Microsoft signature. Clustered around it: a Premium question Characters, Merge Intervals, Meeting Rooms II, four Premium questions, Kth Largest Element, a Premium question, Reverse a Linked List, Rotate Image. Over-prepare those few and you have covered most of what the loop reaches for. This lesson maps the patterns, points you at the paid lessons that drill each one, and names the three things that make Microsoft its own interview.

The Microsoft angle
Clean, readable, tested code beats the clever one-liner. The bar here is correctness and clarity, full stop. Your code has to compile and run, edge cases handled, and read like something a teammate could maintain. Microsoft graders take the solution that is obviously right over the dense trick that saves three lines and hides a bug. Talk through your cases, write a quick test in your head or in the editor, and fix the off-by-one before they point at it. If the pattern fundamentals feel shaky, the free Foundations course drills each one from the base up so these lessons can stay on what makes Microsoft Microsoft.

The recurring core, by pattern

Microsoft runs no standardized question bank; interviewers and teams pick their own sets, which is why the recurring core matters more than any single problem. The favorites cluster in a few places. Edge-case-heavy string and interval work is the widest bucket, leaning on two-pointer, sliding-window, and matrix manipulation. The tree and linked-list classics are the most characteristic cluster, led by the near-universal reverse-a-list warm-up. Grid and graph traversal is rising in the senior tracks. The design-a-data-structure problems bridge into a first-class OOD round, with a Premium question the highest-frequency single item anywhere in the loop. Dynamic programming shows up less than candidates expect and stays one-dimensional. And the online assessment is its own greedy-string universe that barely touches the onsite classics. The lessons below take each bucket in turn and drill its high-return problems as runnable code.

The Microsoft angle
OOD/LLD is a first-class round, so budget for it. Generic interview lists bury elevator and parking-lot prompts as footnotes. At Microsoft a dedicated object-oriented design round is common, and below Senior it frequently takes the slot a distributed system-design round fills elsewhere. The grade there is a clean, extensible class model and the right move on the "now add X" follow-up, not algorithmic cleverness. A Premium question wears two hats here: it shows up as a data-structure problem and as the "design a cache, then extend it to LRU" OOD prompt. Recognize that the two are one problem, prepare it once, and treat the design round as load-bearing rather than a warm-up.

The Microsoft coding questions asked most

A short set of named problems keeps resurfacing across Microsoft SDE and SDE II loops, regardless of the org running the interview. Learn the pattern under each one, not the title, because the title is what teams change. The pattern lessons below work each problem end to end as runnable code, and the deep algorithm walkthrough for each lives in the free Foundations DS&A course.

Microsoft coding interview questions, by pattern
ProblemPatternDifficulty
a Premium questionDesign (hash map + linked list)Medium
a Premium question CharactersSliding windowMedium
a Premium questionSliding windowHard
Merge IntervalsSorting / intervalsMedium
Meeting Rooms IIIntervals / min-heapMedium
Rotate ImageMatrix manipulationMedium
Reverse a Linked ListLinked listEasy
Clone GraphGraph traversalMedium
Kth Largest ElementHeapMedium
+6 more Microsoft questions in Premium →
The problems that recur most across recent Microsoft SDE and SDE II loops. Difficulty is the standard LeetCode rating.

SDE vs SDE II: how the bar shifts by level

Microsoft's IC ladder runs on hidden numeric levels, and the two you meet most in the loop are SDE at 59/60 and SDE II at 61/62. The coding problems barely change between them. Both levels see the same classic medium patterns and the same recurring core above. What moves is the design round and the depth of the follow-ups. At SDE the design skews object-oriented and lighter, and interviewers mainly want correct, clean code with an approach they can follow. At SDE II the object-oriented design interview carries real weight and often stands in for a distributed system-design round. The coding follow-ups also probe harder on edge cases, complexity, and how your code would hold up in production.

The Microsoft angle
"sde 2 at microsoft" is a leveling read, not a harder LeetCode list. Candidates prepping for SDE II sometimes go looking for a scarier problem set and never find one, because it does not exist. The coding bar is the same medium core. The lever that decides SDE II versus a down-level to SDE is the object-oriented design round and whether your follow-ups show ownership of a real system, not another lap through LC-hard. Down-leveling is common and partly headcount-driven, so treat the leveling and offer mechanics as part of your prep, not an afterthought.

The phone screen and the first gate

Before the onsite loop, most orgs run one screening gate, and which one you get depends on the pipeline. Campus and university pipelines lean on the online assessment. Many experienced-hire team pipelines instead run a technical phone screen: a single 45-to-60-minute call with an engineer, one coding problem in a shared editor, from the same classic medium core as the onsite. The phone screen is a compressed version of a loop coding round, so the same clean-and-tested bar applies, and it usually opens with a few minutes of behavioral. Confirm with your recruiter which gate your role uses, because they prep differently. The phone screen is a live problem you talk through. The assessment is timed and graded against test cases with no human in the room.

The online assessment is a different world

Many loops, depending on the org, open with an online assessment on Codility or HackerRank, two or three problems in sixty to ninety minutes, before any human sees you. The catch is that the OA draws from a recognizable, semi-stable bank that barely overlaps the onsite classics. Its problems lean greedy, counting, and string-flavored, rarely tree-hard or graph-hard. The signature is the no-3-consecutive-letters family, which appears under five different titles but is really one idea. Max Network Rank and minimum adjacent swaps to make a palindrome round out the core.

The Microsoft angle
The OA blindsides pure-LeetCode preppers. Study only "top Microsoft onsite" and you will over-index on trees and DP, then hit a greedy-string OA you never rehearsed. The fix is to treat the assessment as its own preparation track. Learn the no-3-consecutive-letters idea once and you have covered most of the forms it takes; add Max Network Rank and the palindrome-swap problem and you have the core. The online-assessment lesson works this bank directly, because the gate before the loop deserves prep the loop's classics will not give you.

One more Microsoft-flavored corner: OS and threading questions appear more here than at peer companies. "Print 1 to 100 using three threads" and a thread-safe singleton are the staples, alongside producer-consumer and plain conceptual questions about how threads, processes, and virtual memory work. They turn up in real loops, India SDE-II rounds especially. They are absent from the standard algorithm lists, so a candidate who only grinds algorithm tags can be caught flat. The design-data-structures and OOD lessons fold the threading-flavored work in where it belongs.

How these lessons are organized

Each lesson below takes one part of the map. The pattern lessons work the recurring core for that bucket as runnable problems, with the Microsoft framing and the follow-ups the room actually adds. The OOD/LLD lesson runs the design round end to end. The online-assessment lesson drills the separate OA bank. Where a lesson leans on a base data-structures idea, the deep walkthrough lives in the free Foundations course so these stay on what is specifically Microsoft.

Arrays & Strings

The widest bucket. Two-pointer and sliding-window, the interval cluster (Merge Intervals, Meeting Rooms II), matrix work like Rotate Image, and the edge-case string problems Microsoft favors. Start here.

Trees & Linked Lists

Microsoft's most characteristic cluster. LCA, serialize and deserialize, max path sum, and the near-universal reverse-a-linked-list, plus the merge and cycle classics.

Graphs & Grids

BFS, DFS, and topological sort. a Premium question, a Premium question, a Premium question, and Clone Graph, the bucket that rises in the SDE-II and senior tracks.

Dynamic Programming

Present but overrated by candidates, and kept to medium one-dimensional DP. Two Premium questions, Longest Increasing Subsequence, and Decode Ways.

Design a Data Structure

Implement-a-class problems that bridge into OOD. A Premium question (the highest-frequency single item), a Premium question, and Top K, plus the threading-flavored work.

Object-Oriented & Low-Level Design

A first-class Microsoft round. The elevator (the obsession), parking lot, and cache-extended-to-LRU, run as clean class models with the extensibility follow-up that decides the round.

The Online Assessment

The separate universe before the loop. The no-3-consecutive-letters family, Max Network Rank, and the palindrome-swap problem, the bank that blindsides onsite-only prep.

Common questions

Is the Microsoft software engineer coding interview hard?

Medium, not brutal. The loop is broad and leans on a classic core at LeetCode easy-to-medium, with genuine LC-hard rarer than at Google or Meta. What trips candidates up is rarely raw difficulty. It is the format: the online assessment is a separate greedy-string universe, object-oriented design is a first-class round, and OS and threading questions surface more than at peers. Cover the recurring core, prep the OOD round, and you clear it.

What is the difference between SDE and SDE II at Microsoft?

The coding problems are the same medium core at both levels. The difference is the design round and the follow-ups. SDE (59/60) is coding-dominant with lighter, object-oriented design. SDE II (61/62) leans on the object-oriented design interview, which often replaces distributed system design, and probes complexity and production-readiness harder. There is no separate "SDE 2 LeetCode list." The leveling lesson covers how the level actually gets set.

Does Microsoft do a phone screen?

Often, yes, but it depends on the org. Experienced-hire team pipelines commonly run a technical phone screen, a single call with one coding problem from the same classic core, while campus pipelines lean on the online assessment instead. Ask your recruiter which gate your role uses so you prep the right one.

How do I prepare for the Microsoft software engineer interview?

Over-prepare the recurring core above, starting with a Premium question and the sliding-window and interval classics, then work down the pattern lessons in this section. Budget real time for the object-oriented design round, rehearse the online assessment as its own track if your org sends one, and carry a working grasp of locks and threads for infrastructure orgs. Practice tracing a concrete input by hand so your code reads as tested, because that is the bar.

Key Takeaways

  • ✓The Microsoft software engineer coding interview is broad but medium: it spans the whole pattern map at easy-to-medium difficulty, with less LC-hard than Google or Meta. You cannot skip a pattern, but no single problem goes exotic.
  • ✓A stable classic core does most of the work. A Premium question is the standout, with Longest Substring, Merge Intervals, Meeting Rooms II, a Premium question, LCA, and Reverse-a-List recurring across years and geographies. Over-prepare those few.
  • ✓SDE and SDE II share the same coding core; the level is decided by the object-oriented design round and the follow-ups, not a harder problem list. The first gate is a phone screen or an online assessment, depending on your org.
  • ✓The bar is clean, readable, tested code that runs, valued over the clever one-liner. Talk through your edge cases and ship a solution a teammate could maintain.
Had your Microsoft interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Microsoft interview guide

Know what Microsoft asks before you walk in.

21 coding · 3 system design · 24 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.