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

SDE - Intern

Microsoft
upvote
share-icon
3 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 12 months
Topics: Recursion, Dynamic Programming, Graphs, Trees, OOPS.
Tip
Tip

Tip 1 : Practice problems from different topics.
Tip 2 : Mention team based projects in your resume to showcase team work.

Application process
Where: Campus
Eligibility: No criteria
Resume Tip
Resume tip

Tip 1: Mention team based projects on resume to showcase team work.
Tip 2: Write down achievements along with a small description of the event.

Interview rounds

01
Round
Easy
Online Coding Interview
Duration60 mins
Interview date10 Aug 2021
Coding problem2

The round was as around 9:00 am. The platform was pretty simple. One important thing was that the platform does not shows whether your solution is correct or not. It simply runs your solutions on samples. After the test your solution is run on main test files and you are selected according to the score you get.

1. Puzzle

You are given a six sided dice. You toss it n number of time. Find the probability of getting exactly k '6's.

Problem approach

I just used combination to solve this problem. The number of ways would be C(n, k) * (5 ^ (n - k)).

2. Lexicographically smallest equivalent string

Moderate
25m average time
75% success
0/80
Asked in companies
MicrosoftPayPal

Ninja has two strings ‘s’ and ‘t’ of same length, he knows that both strings are equivalent strings which means s[i], t[i] will follow all rules of any equivalence relation that are:

  • Reflexive : s[i] = t[i]
  • Symmetric: s[i] = t[i] => t[i] = s[i]
  • Transitive: if s[i] = t[i] and t[i] = s[j] then s[i] = s[j]
  • Ninja wants your help to find the lexicographically smallest equivalent string of a given string ‘str’.

    Note:

    1. String ‘s’, ‘t’ and ‘str’ consist of only lowercase English letters from ‘a’ – ‘z’.
    2. String ‘s’ and ‘t’ are of same length.
    

    For example:

    Let s = “abc” , t = “xyz” and str = “xbc” then all strings that we can generate are “abc”, “abz”, “ayc”,”ayz”, “xbc”, “xbz”, “xyc”, “xyz” and smallest of all these is “abc”. 
    
    Problem approach

    I used 3-d dp to solve this problem. The states of my dp were dp[index][last_character][second_last_character].

    Try solving now
    02
    Round
    Medium
    Video Call
    Duration60 mins
    Interview date11 Aug 2021
    Coding problem1

    It was a 60 minutes coding interview round, where the interviewer asked me a single problem and continuously modified it after my each answer.

    1. Number of Islands

    Easy
    0/40
    Asked in companies
    IBMDunzoMicrosoft

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

    Problem approach

    I straight away applied depth first search on this problem and maintained a count of water bodies in the answer variable. This was the most optimal solution, so he twisted this question and asked another one.

    Try solving now
    03
    Round
    Easy
    Video Call
    Duration60 mins
    Interview date11 Aug 2021
    Coding problem1

    It was a 60 minutes round of project discussion and system design

    1. System Design Question

    You have to design an OTP system for users.

    Problem approach

    Tip 1: Don't jump into the solution straight away
    Tip 2: Visual representation is always better, so ask the interviewer if you can share your screen and draw block diagrams.
    Tip 3: Think about different data structures you can use.

    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