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

SDE - 1

Microsoft
upvote
share-icon
5 rounds | 12 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 2.5 months
Topics: DSA(DP, Backtracking, strings), DBMS, OOPS, LLD-HLD, Projects
Tip
Tip

Tip 1 : There was very less time gap between interview call and interviews, so be prepared.
Tip 2 : Try to solve problems without applying topic tags, this will help us to solve new problems.
Tip 3 : Try developing projects using various design patterns and SOLID principles.

Application process
Where: Referral
Eligibility: Need two development projects on Resume and 1.5+ YOE
Resume Tip
Resume tip

Tip 1 : Need two development projects
Tip 2 : Product based companies

Interview rounds

01
Round
Medium
Online Coding Test
Duration110 minutes
Interview date10 Feb 2022
Coding problem2

It happened in morning

1. 0 1 Knapsack

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

A thief is robbing a store and can carry a maximal weight of W into his knapsack. There are N items and the ith item weighs wi and is of value vi. Considering the constraints of the maximum weight that a knapsack can carry, you have to find and return the maximum value that a thief can generate by stealing items.

Try solving now

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”. 
    
    Try solving now
    02
    Round
    Easy
    Video Call
    Duration50 minutes
    Interview date11 Feb 2022
    Coding problem2

    The interview started with self introduction followed by work and project which I'm doing in current company. Tech stack which I use in current project has been asked.
    Two Coding questions, we have to write a production ready code which cover all the edge cases. This was also conducted on Codility.

    1. Covid Vaccination

    Moderate
    0/80
    Asked in companies
    OracleAmerican ExpressShareChat

    We are suffering from the Second wave of Covid-19. The Government is trying to increase its vaccination drives. Ninja wants to help the Government to plan an effective method to help increase vaccination following safety measures. Time is running out. Can you help the nation?

    You are given two positive integers: ‘n,’ ‘maxVaccines’ denoting the number of days for which this vaccination drive will go on and the total number of vaccines available for the drive, respectively. You have to find the number of vaccines administered each day. You are also given a number ‘dayNumber,’ and we are interested to know the maximum number of vaccines that can be administered on ‘dayNumber’ th day.

    The rules of the vaccination drive :

    1. There should be a positive number of vaccines administered each day during the vaccination drive.

    2. The absolute difference between the number of vaccines in two consecutive days should not exceed 1.

    3. The sum of all the elements of the vaccines array does not exceed maxVaccines, that is, you cannot administer more vaccines than what is provided to you.

    4. Vaccines administered on ‘dayNumber’ th day should be maximized.

    Problem approach

    Solved the question using various approaches in the decreasing order of time complexities and finally coded the optimized version using binary search. (Easy-Medium)

    Try solving now

    2. Java Questions

    A story based question which was asked in terms of threads and tasks.

    Problem approach

    Never solved this type of question earlier hence took some time to analyze and come up with a solution. Interviewer was helpful, answered all of my doubts. Finally solved the question using BFS + degrees concept. Interviewer asked me to think about edge cases. Missed one of the edge cases, got to know regarding it from the Interviewer, made code modifications to handle it. (Med-Hard)

    03
    Round
    Medium
    Video Call
    Duration60 minutes
    Interview date11 Feb 2022
    Coding problem4

    Taken by Software Engineer with 5+ years of experience.

    1. Puzzle Questions

    Detailed discussion about current work and tech stack.

    2. Add Two Numbers As Linked Lists

    Moderate
    20m average time
    80% success
    0/80
    Asked in companies
    SprinklrIBMDeutsche Bank

    You are given two non-negative numbers 'num1' and 'num2' represented in the form of linked lists.


    The digits in the linked lists are stored in reverse order, i.e. starting from least significant digit (LSD) to the most significant digit (MSD), and each of their nodes contains a single digit.


    Calculate the sum of the two numbers and return the head of the sum list.


    Example :
    Input:
    'num1' : 1 -> 2 -> 3 -> NULL
    'num2' : 4 -> 5 -> 6 -> NULL
    
    Output: 5 -> 7 -> 9 -> NULL
    
    Explanation: 'num1' represents the number 321 and 'num2' represents 654. Their sum is 975.
    


    Try solving now

    3. Word Search - l

    Moderate
    30m average time
    60% success
    0/80
    Asked in companies
    OlaGoldman SachsIBM

    You are given a 2D board('N' rows and 'M' columns) of characters and a string 'word'.


    Your task is to return true if the given word exists in the grid, else return false. The word can be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring.


    Note:
    The same letter cell should not be used more than once.
    
    For Example:
    For a given word “design” and the given 2D board 
    [[q’, ‘v’, ‘m’, ‘h’],
     [‘d’, ‘e’, ‘s’, ‘i’],
     [‘d’, ‘g’, ‘f’, ‘g’],
     [‘e’, ‘c’, ‘p’, ‘n’]]
    
    The word design can be formed by sequentially adjacent cells as shown by the highlighted color in the 2nd row and last column.
    

    board

    Problem approach

    Trie based approach. Only asked for approach, did not ask to code

    Try solving now

    4. Operating System Questions

    Discussion on Multi-Threading, Mutual Exclusion, Design Patterns in Java, Inheritance vs Interfaces, Synchronization, Producer-Consumer problem

    04
    Round
    Medium
    Video Call
    Duration80 minutes
    Interview date12 Feb 2022
    Coding problem2

    1. System Design

    This round also started off with introduction followed by prior experience. Then Interviewer asked me an LLD question where I needed to design and code one of the Microsoft Product's features. Used SOLID principles and factory pattern in designing which impressed the interviewer. (Thanks to my current company's project where I learnt and used SOLID principles + various design patterns in production). Then I wrote code for my design. Interviewer told me that it is correct solution but can still be improvised with additional design patterns. Then I was asked two programming questions.

    2. Break The Integer

    Moderate
    30m average time
    70% success
    0/80
    Asked in companies
    AdobeAmazonMicrosoft

    Ninja is given an integer ‘N’ . One day Ninja decides to break the integer into K positive parts (K>=2) such that the sum of all parts is equal to ‘N’.Ninja wants to maximize the product of all the ‘K’ parts.

    Help Ninja in helping what maximum possible product it can obtain by breaking the integer ‘N’ into ‘K’ positive parts where ‘K’ can be any integer greater than 2.

    Try solving now
    05
    Round
    Easy
    HR Round
    Duration40 minutes
    Interview date14 Feb 2022
    Coding problem2

    This was the last round. Interviewer was one of the senior most persons with 15+ years of experience in Microsoft. Again I gave my intro, clearly explained the work which I currenlty do with architecture diagrams. The result of previous round was very good, hence didn't get any technical questions further. Was asked generic questions like reason to join Microsoft, how my life went till now etc.

    1. Basic HR Questions

    Why do you want to join Microsoft?

    How was your previous work experience?

     

     

    2. Valid Parentheses

    Easy
    10m average time
    80% success
    0/40
    Asked in companies
    AmazonIntuitOracle

    You're given a string 'S' consisting of "{", "}", "(", ")", "[" and "]" .


    Return true if the given string 'S' is balanced, else return false.


    For example:
    'S' = "{}()".
    
    There is always an opening brace before a closing brace i.e. '{' before '}', '(' before ').
    So the 'S' is Balanced.
    
    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 - 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
    1 rounds | 2 problems
    Interviewed by Microsoft
    7425 views
    0 comments
    0 upvotes
    company logo
    SDE - 1
    4 rounds | 7 problems
    Interviewed by Microsoft
    1272 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