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

SDE - Intern

Microsoft
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: Data Structures and Algorithms, DBMS, Java, Computer Networks, Operating Systems, Oops
Tip
Tip

Tip 1 : Maintain At least 2 projects in your resume.
Tip 2 : Be Confident enough 
Tip 3 : Solve lot of problems

Application process
Where: Campus
Eligibility: 7 cgpa
Resume Tip
Resume tip

Tip 1 : Achievements are good to have
Tip 2 : You should be able to answer all the questions related to skills in the resume.

Interview rounds

01
Round
Easy
Online Coding Interview
Duration120 Minutes
Interview date8 Dec 2020
Coding problem2

Total 3 coding questions were there, out of which I don't remember the last one.

1. Ninja And The Dance Competetion

Easy
10m average time
90% success
0/40
Asked in companies
MicrosoftVisaSalesforce

Ninja has been asked to organize a dance competition. Ninja decided that he will take individual entries and then will divide them into pairs. As part of the entry, he asked the participants to choose any number.

Ninja then thought of a creative method to divide them into pairs. He decided that he would select a number ‘K’, and then select numbers from the list that have a difference equal to ‘K’.

You need to help Ninja in finding the number of distinct pairs from the numbers with differences equal to ‘K’.

Example:
Let us suppose the numbers are chosen by participants: [2, 6, 5, 2, 3] and K = 3, then the distinct pairs having differences equal to K are: [2, 5] and [3, 6] so print 2. 
Note:
The list of numbers can contain duplicate numbers, you need to print only the distinct pairs.

For example [2, 2, 3, 4] and K = 1, so you need to print 2 as the two distinct pairs are: (2, 3) and (3, 4).
Try solving now

2. Longest Common Prefix After Rotation

Moderate
30m average time
60% success
0/80
Asked in companies
IBMMicrosoftOLX Group

You are given two strings 'A' and 'B' where string 'A' is fixed. But you can perform left shift operations on string B any number of times.

Your task is to find out the minimum number of left-shift operations required in order to obtain the longest common prefix of string 'A' and 'B'.

Note:

Left shift is defined as a single circular rotation on the string after which the first character becomes the last character and all other characters are shifted one index to the left.
For Example:
If A = “an”, B = “can”.
After performing one left shift operation, string B becomes “anc”.
After performing two left shift operations, string B becomes “nca”.
Follow Up:
Can you solve this in linear time and space complexity?
Try solving now
02
Round
Easy
Video Call
Duration60 Minutes
Interview date10 Dec 2020
Coding problem2

1. Rotate matrix by 90 degrees

Easy
15m average time
85% success
0/40
Asked in companies
SamsungAdobeMicrosoft

You are given a square matrix of non-negative integers 'MATRIX'. Your task is to rotate that array by 90 degrees in an anti-clockwise direction using constant extra space.

For example:

For given 2D array :

    [    [ 1,  2,  3 ],
         [ 4,  5,  6 ],
         [ 7,  8,  9 ]  ]

After 90 degree rotation in anti clockwise direction, it will become:

    [   [ 3,  6,  9 ],
        [ 2,  5,  8 ],
        [ 1,  4,  7 ]   ]
Try solving now

2. Sort An Array of 0s, 1s and 2s

Easy
10m average time
90% success
0/40
Asked in companies
IBMSamsungDirecti

You have been given an array/list 'arr' consisting of 'n' elements.


Each element in the array is either 0, 1 or 2.


Sort this array/list in increasing order.


Do not make a new array/list. Make changes in the given array/list.


Example :
Input: 'arr' = [2, 2, 2, 2, 0, 0, 1, 0]

Output: Final 'arr' = [0, 0, 0, 1, 2, 2, 2, 2]

Explanation: The array is sorted in increasing order.
Try solving now
03
Round
Easy
Video Call
Duration60 Minutes
Interview date15 Dec 2020
Coding problem1

This was HR + Technical round
He started with questions on projects and Os and Dbms and Oops
Then asked one coding question

1. Number of Islands

Easy
0/40
Asked in companies
MicrosoftMeeshoAmazon

You have been given a non-empty grid consisting of only 0s and 1s. You have to find the number of islands in the given grid.

An island is a group of 1s (representing land) connected horizontally, vertically or diagonally. You can assume that all four edges of the grid are surrounded by 0s (representing water).

Try solving now

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 - Intern
3 rounds | 8 problems
Interviewed by Microsoft
2317 views
2 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Microsoft
1352 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 5 problems
Interviewed by Microsoft
1985 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Microsoft
631 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
15605 views
4 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
10216 views
2 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 4 problems
Interviewed by Amazon
6389 views
3 comments
0 upvotes