Microsoft interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Microsoft
upvote
share-icon
4 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Journey
I ensured I balanced all the different things that contribute to a better placement, including GPA, DSA, Projects, Skills, and basic Subjects. I was not super good at any of them just tried getting a good balance. I was always advised to just focus on DSA, competitive coding especially, and get a good CodeForces rank but my temperament did not allow me to chase a Master rating on CodeForces and I could only reach almost Expert. This was due to my lack of confidence which made me forfeit contests many times which dragged my rating down and this slowly led to me avoiding contests. So I instead focused on doing InterviewBit twice and apart from that I did around 500-600 DSA questions across different platforms. I also focused on my GPA and 10% of my time I gave to projects as well. Based on my experience, I would like to advise people not to follow someone else's formula of success, you may not excel in competitive coding or may not get a good GPA, so try to find the combination that works for you. In the end, whatever brings out the best in you will help you crack a good company sooner or later. Do not chase something so relentlessly that you sort of don't capitalize on what you are good at. Identify your strengths and make sure you are the best in them, on the side work on your weaknesses to reach to a balanced level.
Application story
I applied on campus, there were 4 total rounds, 1st was the relatively simple coding round. The selection was not just based on a coding round but highly considered your CV and your GPA. No actual weightage was given to the competitive coding profile here. This was followed by 2 technical rounds and one HR round.
Why selected/rejected for the role?
Except for me being able to solve all the technical rounds which I feel was relatively easy, GPA and personality were the biggest factors amounting to my selection. Microsoft did prefer high GPA candidates. Apart from it being fluent with your conversations, being confident with your answers and how you present yourself plays a great role in your selection. Companies like Microsoft do not care that much if you make small mistakes in your technical rounds as long as you show a learning intent and are smart enough to learn their technologies but also capable of handling meetings, interacting with multiple people, and having the ability to collaborate with fellow teammates.
Preparation
Duration: 8 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1: Find your balance between GPA, DSA, and Projects based on what you are good at
Tip 2: If competitive coding is not your thing, pick up some vast DSA sheets and try doing it twice. Do interviewbit
Tip 3: Work on your interview-giving skills, your confidence, English, and how you present solutions carry a lot more weight than credit.

Application process
Where: Campus
Eligibility: 8 CGPA
Resume Tip
Resume tip

Tip 1 Google for good resume keywords and include them.
Tip 2:Microsoft technologies as skills in a resume do count. Like powerbi, C#, .net

Interview rounds

01
Round
Easy
Online Coding Test
Duration90
Interview date19 Jul 2022
Coding problem2

The coding round was early morning. There were 2 questions and they were relatively easy.

1. K’th Smallest/Largest Element in Unsorted Array

Easy
15m average time
70% success
0/40
Asked in companies
HSBCSalesforceSprinklr

Given an array arr[] of size N and a number K, where K is smaller than the size of the array. Find the K’th smallest element in the given array. Given that all array elements are distinct.

Examples:  

Input: arr[] = {7, 10, 4, 3, 20, 15}, K = 3 
Output: 7

Input: arr[] = {7, 10, 4, 3, 20, 15}, K = 4 
Output: 10 

Problem approach

Max heap, keep only K elements in the heap and remove the largest element when the heap size exceeds K. In the end, return the largest element of the heap

Try solving now

2. Longest Palindromic Substring

Moderate
35m average time
78% success
0/80
Asked in companies
UiPathGrabMicrosoft

Given a string str, the task is to find the longest substring which is a palindrome.

 

Problem approach

Solved using DP. dp[][] stores status of substring str[i . . . j]. If str[i..j] is a palindrome then it equals the length of it else it includes 0. If str[ij] status is known, to find the status of str[i-1...j+1] we just have to compare i-1 and j+1 characters.

Try solving now
02
Round
Easy
Video Call
Duration30
Interview date22 Jul 2022
Coding problem2

Interview was early morning. It was mostly focused on my Projects and my internship experience. I was asked a few OOPs question and was asked to perform quicksort.

1. Overloading and Overriding

What is the difference between overloading and overriding? (Link)

Problem approach

Overloading is when two or more methods with the same name but different parameters occur. It is solved during compile-time. 
Overriding allows subclasses to have a specific implementation of a method already provided by its parent class. Solved during runtime

2. Implement Quick Sort

Moderate
10m average time
90% success
0/80
Asked in companies
Samsung R&D InstituteLenskart.comSamsung

You are given an array of integers. You need to sort the array in ascending order using quick sort.

Quick sort is a divide and conquer algorithm in which we choose a pivot point and partition the array into two parts i.e, left and right. The left part contains the numbers smaller than the pivot element and the right part contains the numbers larger than the pivot element. Then we recursively sort the left and right parts of the array.

Example:

Let the array = [ 4, 2, 1, 5, 3 ]
Let pivot to be the rightmost number.

example

After the 1st level partitioning the array will be { 2, 1, 3, 4, 5 } as 3 was the pivot. After 2nd level partitioning the array will be { 1, 2, 3, 4, 5 } as 1 was the pivot for the left part and 5 was the pivot for the right part. Now our array is sorted and there is no need to divide it again.

Problem approach

I performed quicksort as mentioned in GFG as this is Microsoft's favorite question and I had memorized it properly.

Try solving now
03
Round
Easy
Video Call
Duration30
Interview date22 Jul 2022
Coding problem3

It was in the afternoon after round 1. The interviewer was a senior person this time and I expected decent DSA Questions.

1. Detect Cycle in a Directed Graph

Moderate
30m average time
75% success
0/80
Asked in companies
MicrosoftAdobeAmazon

Given the root of a Directed graph, The task is to check whether the graph contains a cycle or not. 

 

Problem approach

Step 1: I wanted to explain the most basic solution to this with DFS but I had a better solution in mind. Explaining this solution to find the back edge in a few minutes I moved on to the next approach
Step 2: I explained Kahn's topological sort solution. Ensure that all elements are removed and no node is remaining with indegree > 0.
The interviewer was happy with this.

Try solving now

2. Kernel and a user-level process

Explain the differences between a kernel and a user-level process. (Link)

Problem approach

The kernel is the core component of an operating system, responsible for interacting directly with the hardware and managing resources. User-level processes, on the other hand, are applications running in user space, which rely on the kernel for system services.

3. Context Switch

How does a context switch work, and why is it essential?

Problem approach

A context switch is the process of saving the current state of a process or thread and loading the state of another process or thread to allow multitasking. It is essential to allow the illusion of concurrent execution.

04
Round
Easy
HR Round
Duration20
Interview date23 Jul 2022
Coding problem0

HR or culture fit round was early in the morning. The interviewer was very calm and sort of portrayed it like I would already pass which boosted my confidence and helped me express myself better throughout the interview.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
5 rounds | 15 problems
Interviewed by Microsoft
4035 views
0 comments
0 upvotes
company logo
SDE - 1
5 rounds | 7 problems
Interviewed by Microsoft
2661 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Microsoft
1640 views
0 comments
0 upvotes
company logo
SDE - 1
1 rounds | 2 problems
Interviewed by Microsoft
7425 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115097 views
24 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35147 views
7 comments
0 upvotes
company logo
SDE - 1
3 rounds | 11 problems
Interviewed by Amazon
21829 views
4 comments
0 upvotes