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

Software Engineer

Microsoft
upvote
share-icon
3 rounds | 2 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 14 months
Topics: Data Structures, competitive programming, algorithm design, dynamic programming, conceptual knowledge etc..
Tip
Tip

Tip 1 : Practice questions as max as possible for all the concepts 
Tip 2 : Do projects in any coding language 
Tip 3 : Do internships in your interest domain

Application process
Where: Referral
Eligibility: Above 7.5 CGPA
Resume Tip
Resume tip

Tip 1 : Have good projects on your resume
Tip 2 : Have good internship companies in your resume

Interview rounds

01
Round
Medium
Online Coding Interview
Duration60 minutes
Interview date27 Jul 2022
Coding problem0

Code output MCQ, aptitude mcqs

Total 15 Questions

02
Round
Hard
Video Call
Duration90 minutes
Interview date3 Aug 2022
Coding problem1

1. Complex Number Class

Moderate
0/80
Asked in company
Microsoft

A ComplexNumber class contains two data members: one is the real part (R) and the other is imaginary (I) (both integers).

Implement the Complex numbers class that contains the following functions -

1. constructor

You need to create the appropriate constructor.

2. plus -

This function adds two given complex numbers and updates the first complex number.

e.g.

if C1 = 4 + i5 and C2 = 3 +i1
C1.plus(C2) results in: 
C1 = 7 + i6 and C2 = 3 + i1
3. multiply -

This function multiplies two given complex numbers and updates the first complex number.

e.g.

if C1 = 4 + i5 and C2 = 1 + i2
C1.multiply(C2) results in: 
C1 = -6 + i13 and C2 = 1 + i2
4. print -

This function prints the given complex number in the following format :

a + ib

Note: There is space before and after '+' (plus sign) and no space between 'i' (iota symbol) and b.

Try solving now
03
Round
Hard
Video Call
Duration60 minutes
Interview date8 Aug 2022
Coding problem1

1. Light Up the Street!

Moderate
10m average time
90% success
0/80
Asked in company
Microsoft

You are walking on a street of length ‘N’. You want to light up the street by installing street lights.

There are 'M' streetlights and the 'ith' streetlight can be installed at position 'Ci'.

You are also given the range of the streetlights 'R' which means that the 'ith' streetlight installed at position 'Ci' will enlighten street from 'Ci-R' to 'Ci+R'.

Output the minimum number of street lights required to light up the whole street or output -1 if it is impossible to light the whole street under the given conditions.

It is sufficient to enlighten the integer positions, it is not required to enlighten the area between two integer positions.

For example : 'N' = 8, 'M' = 2, 'C' = [1, 6], 'R' = 2. The answer for this case is 2 as we can enlighten streetlight at position 1 and streetlight at position 6. These two will enlighten the positions 1, 2, 3, 4, 5, 6, 7, 8.

Example:-
N=10, M=3
C = [2,4,7] ( The positions of the streetlights )
R = 3 ( The range of the street-lights)


The answer will be 2 as we can install the first street light at position 2 so it illuminates the street from positions from 1 to 5 and the third street light at 7 so it illuminates the street from positions from 4 to 10.
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
Software Engineer
5 rounds | 5 problems
Interviewed by Microsoft
10148 views
1 comments
0 upvotes
company logo
Software Engineer
5 rounds | 8 problems
Interviewed by Microsoft
0 views
0 comments
0 upvotes
company logo
Software Engineer
4 rounds | 6 problems
Interviewed by Microsoft
1693 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 5 problems
Interviewed by Microsoft
1117 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
3 rounds | 7 problems
Interviewed by Optum
7977 views
1 comments
0 upvotes
company logo
Software Engineer
2 rounds | 4 problems
Interviewed by Amazon
4448 views
1 comments
0 upvotes
company logo
Software Engineer
3 rounds | 5 problems
Interviewed by Amazon
3674 views
0 comments
0 upvotes