Selected - Microsoft SDE2 Interview Experience

microsoft logo
microsoft
· SDE II· 4.5y exp
March 9, 2026 · 40 reads

Summary

I recently completed my SDE2 interview loop at Microsoft, which included three technical rounds (DSA, LLD, CS Fundamentals), an Architectural Design round, and a Behavioral (AA) round. I received positive feedback and a verbal offer for the WSD team, and I am currently awaiting the official offer letter.

Full Experience

I recent completed SDE2 loop and wanted to share my experience.

Current Experience - 4.5 year

Three rounds happened on Friday as part of the hiring event drive, and the AA happened the following week after I received positive feedback from all three rounds.

(DSA + LLD) with Principle Engineer -

  1. DSA - Top K Frequent Error Codes You are given a list of log lines. Each line contains an errorCode (string). Return the Top K most frequent error codes. Sort by higher frequency first; if tie, sort by ascending List of errors codes - e1,e2,e3,e1,e2,e3 and k=2
  2. LLD - 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. Please design the classes using Dependency Injection, Factory, or Strategy design patterns. They were not focused on running the code, as we were discussing the solution on the whiteboard. Instead, I explained the design very well and structured it in the best way.

Verdict: Passed. The round lasted 1 hour.


DSA + LLD with Principle Engineer -

DSA Question -

Problem Statement

There are employee_nodes employees in a company. Among them, k special employees have a data network and can share their mobile hotspots with other employees.There are already employee_edges connections between employees. Each connection links two employees: employee_from[i] and employee_to[i], meaning either of these employees can share a mobile hotspot.Two employees x and y are considered connected if there exists a path between them.

All employees connected to a special employee x will use the mobile hotspot of that special employee.Previously, to restrict data usage, any employee could be connected to at most one special employee. However, due to increased data consumption, any employee can now be connected to at most max_connections special employees. Your task is to determine the maximum number of edges that can be added to the graph such that no employee is connected to more than max_connections special employees.

Note: The given graph does not contain self-loops or multiple edges between nodes. The graph formed after adding edges should not contain self-loops or multiple edges. It is guaranteed that in the given graph, no two special employees are connected to each other.

Example employee_nodes = 4 employee_edges = 1 k = 2 max_connections = 1 special_employees = [1, 3]

employee_from = [1] employee_to = [2]

Employees 1 and 3 are special employees. Since max_connections = 1, they cannot be connected to each other. Employee 4 can be connected to employees 1 and 2, resulting in two additional edges. Answer = 2

Function Description

Complete the function getMaximumEdges with the following parameters:

getMaximumEdges( int employee_nodes, int employee_from[employee_edges], int employee_to[employee_edges], int special_employees[k], int max_connections ) Parameters

employee_nodes: Total number of employees (nodes) employee_from[employee_edges]: One endpoint of each connection employee_to[employee_edges]: The other endpoint of each connection special_employees[k]: List of special employees max_connections: Maximum number of special employees any employee can be connected to

Return the maximum number of edges that can be added to the graph such that any employee is connected to at most max_connections special employees.

LLD Question asked in this round

  1. 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 stream. Three threads one writing to the buffer,your framework thread is reading it. and ack when it is written to the file/tool.

  2. 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

Verdict: Passed. The round lasted 1.5 hour.


DSA + CS Fundamentals with Principle Engineer

  1. What is the difference between a process and a thread?
  2. If multiple threads access the same variable and they don’t write to it, do we face any problem?
  3. What issues arise when multiple threads access a shared variable?
  4. 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?
  5. What exactly causes race conditions in multithreaded programs? What is Microservices Architecture? How is Microservices Architecture different from a monolithic architecture? If services are running on different virtual machines, how do they communicate with each other?
  6. How does gRPC help in communication between services running on different VMs? Why would we choose gRPC over REST for service-to-service communication?
  7. What other communication mechanisms can be used between services apart from gRPC? What is Event-Driven Architecture?
  8. What do we mean by an “event” in Event-Driven Architecture? How does Event-Driven Architecture work in a microservices system?
  9. How is Event-Driven Architecture different from synchronous communication like REST or gRPC? What are the benefits of using Event-Driven Architecture?
  10. What challenges or trade-offs come with Event-Driven Architecture?

Coding Question First question - https://leetcode.com/problems/reverse-nodes-in-k-group/description/ Second Question – Longest Substring Without Duplicates. I explained the approach and wrote the code using the sliding window technique.

They expect the code to be running and optimized.

Verdict: Passed. The round lasted 1 hour.


AA round with Microsoft Leader

Behavioral Question

  1. Complex project like end to end ownership
  2. What is one non-technical skill you want to become better at?
  3. Disagreement with manager and teammates
  4. Why are you looking for a change?
  5. Why microsoftHow are AI tools helping you in your projects?

HLD - Design a notification System - HLD + LLD Both

Verdict: Passed. The round lasted 1 hour 20 minutes.

Currently, the recruiter has asked me to submit documents related to my current salary slip and has verbally informed me about my selection. They also mentioned that the offer will be rolled out by the end of next week. I’m hoping there won’t be any hurdles in between.

Team – WSD Team. Let me know if anyone knows how this team is in terms of growth, opportunities, and culture. So far, I have heard that the culture in this team is good and the opportunities are immense.

Let me know if you have any questions. I’d love to answer them and help you guys.

Interview Questions (23)

1.

Top K Frequent Error Codes

Data Structures & Algorithms

You are given a list of log lines. Each line contains an errorCode (string). Return the Top K most frequent error codes. Sort by higher frequency first; if tie, sort by ascending List of errors codes - e1,e2,e3,e1,e2,e3 and k=2

2.

Design Data Access Layer with Runtime Source Change

System Design

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. Please design the classes using Dependency Injection, Factory, or Strategy design patterns.

3.

Maximize Edges in a Special Employee Network

Data Structures & Algorithms

There are employee_nodes employees in a company. Among them, k special employees have a data network and can share their mobile hotspots with other employees.There are already employee_edges connections between employees. Each connection links two employees: employee_from[i] and employee_to[i], meaning either of these employees can share a mobile hotspot.Two employees x and y are considered connected if there exists a path between them. All employees connected to a special employee x will use the mobile hotspot of that special employee.Previously, to restrict data usage, any employee could be connected to at most one special employee. However, due to increased data consumption, any employee can now be connected to at most max_connections special employees. Your task is to determine the maximum number of edges that can be added to the graph such that no employee is connected to more than max_connections special employees. Note: The given graph does not contain self-loops or multiple edges between nodes. The graph formed after adding edges should not contain self-loops or multiple edges. It is guaranteed that in the given graph, no two special employees are connected to each other. Example: employee_nodes = 4, employee_edges = 1, k = 2, max_connections = 1, special_employees = [1, 3], employee_from = [1], employee_to = [2]. Employees 1 and 3 are special employees. Since max_connections = 1, they cannot be connected to each other. Employee 4 can be connected to employees 1 and 2, resulting in two additional edges. Answer = 2. Function Description: Complete the function getMaximumEdges with the following parameters: getMaximumEdges(int employee_nodes, int employee_from[employee_edges], int employee_to[employee_edges], int special_employees[k], int max_connections). Parameters: employee_nodes: Total number of employees (nodes), employee_from[employee_edges]: One endpoint of each connection, employee_to[employee_edges]: The other endpoint of each connection, special_employees[k]: List of special employees, max_connections: Maximum number of special employees any employee can be connected to. Return the maximum number of edges that can be added to the graph such that any employee is connected to at most max_connections special employees.

4.

Design Multi-Module Logging Framework

System Design

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 stream. Three threads one writing to the buffer,your framework thread is reading it. and ack when it is written to the file/tool.

5.

Design Three-Thread Data Exchange (R/W)

System Design

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

6.

Process vs Thread

Other

What is the difference between a process and a thread?

7.

Multiple Threads Reading Same Variable

Other

If multiple threads access the same variable and they don’t write to it, do we face any problem?

8.

Issues with Multiple Threads Accessing Shared Variable

Other

What issues arise when multiple threads access a shared variable?

9.

Heap vs Stack Variables & Thread Conflicts

Other

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?

10.

Causes of Race Conditions

Other

What exactly causes race conditions in multithreaded programs?

11.

Microservices vs Monolithic Architecture

System Design

What is Microservices Architecture? How is Microservices Architecture different from a monolithic architecture? If services are running on different virtual machines, how do they communicate with each other?

12.

gRPC for Service Communication

System Design

How does gRPC help in communication between services running on different VMs? Why would we choose gRPC over REST for service-to-service communication?

13.

Alternative Service Communication Mechanisms

System Design

What other communication mechanisms can be used between services apart from gRPC?

14.

Event-Driven Architecture in Microservices

System Design

What is Event-Driven Architecture? What do we mean by an “event” in Event-Driven Architecture? How does Event-Driven Architecture work in a microservices system? How is Event-Driven Architecture different from synchronous communication like REST or gRPC? What are the benefits of using Event-Driven Architecture? What challenges or trade-offs come with Event-Driven Architecture?

15.

Reverse Nodes in k-Group

Data Structures & Algorithms·Hard
16.

Longest Substring Without Duplicates

Data Structures & Algorithms

Longest Substring Without Duplicates. I explained the approach and wrote the code using the sliding window technique.

17.

Complex Project End-to-End Ownership

Behavioral

Complex project like end to end ownership

18.

Non-Technical Skill for Improvement

Behavioral

What is one non-technical skill you want to become better at?

19.

Disagreement with Manager and Teammates

Behavioral

Disagreement with manager and teammates

20.

Reason for Job Change

Behavioral

Why are you looking for a change?

21.

Why Microsoft?

Behavioral

Why microsoft

22.

AI Tools in Projects

Behavioral

How are AI tools helping you in your projects?

23.

Design Notification System (HLD + LLD)

System Design

Design a notification System - HLD + LLD Both

📣 Found this helpful? Please share it with friends who are preparing for interviews!

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!