Upload Button Icon Add office photos

Microsoft Corporation

Compare button icon Compare button icon Compare

Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards

zig zag pattern zig zag pattern

Filter interviews by

Microsoft Corporation Software Developer Interview Questions, Process, and Tips

Updated 1 Jan 2025

Top Microsoft Corporation Software Developer Interview Questions and Answers

  • Q1. Buses Origin Problem Statement You have been provided with an array where each element specifies the number of buses that can be boarded at each respective bus stop. Bus ...read more
  • Q2. Chess Tournament Problem Statement In Ninjaland, a chess tournament is being organized with C chess players attending. They will all stay in a hotel that has N available ...read more
  • Q3. Day of the Week Calculation Your task is to create a function that determines the day of the week for any given date, whether in the past or the future. Input: The first ...read more
View all 131 questions

Microsoft Corporation Software Developer Interview Experiences

62 interviews found

Interview Questionnaire 

12 Questions

  • Q1. Two numbers are stored in two linked lists, with one digit in each node. Add the numbers and return the resultant sum in a linked list. eg. if LL1= 2 ­> 3 ­> 5, LL2= 1­>4­>5, result should be LL3= 3­>8­>0
  • Ans. 

    Add two numbers stored in linked lists and return the sum in a linked list.

    • Traverse both linked lists and add the digits at each node while keeping track of carry.

    • Create a new linked list to store the sum digits.

    • Handle cases where one linked list is longer than the other.

    • Handle cases where the sum of the last digits results in a carry.

    • Return the new linked list with the sum digits.

  • Answered by AI
  • Q2. Check the no of repeated occurences of a substring in a string
  • Ans. 

    Count the number of times a substring appears in a string.

    • Use a loop to iterate through the string and check for the substring at each index.

    • Use the count() method to count the number of occurrences of the substring.

    • Consider using regular expressions to find all occurrences of the substring.

    • Handle edge cases such as empty strings or substrings.

  • Answered by AI
  • Q3. How the memory is structured (heap, stack, etc). He wrote a program and asked which variables would be stored where etc. As I mentioned that I like Algorithms, he then went on to Algos
  • Q4. Data compression: Given a string “aabbbccc”, save it as “a2b3c3”. Here, I was asked to write a pseudocode, followed by a code in C++, optimize it and then all the testcases. Eg. “aabcc” would become “a2bc2...
  • Ans. 

    Compress a string by replacing consecutive characters with their count.

    • Iterate through the string and count consecutive characters.

    • Append the character and its count to a new string.

    • Handle edge cases like single characters.

  • Answered by AI
  • Q5. Given a node in a binary tree, find the leftmost node in the same level. I wrote the pseudocode, and testcases
  • Ans. 

    Find the leftmost node in the same level as a given node in a binary tree.

    • Traverse the tree level by level using BFS

    • For each level, keep track of the leftmost node encountered

    • Return the leftmost node at the same level as the given node

  • Answered by AI
  • Q6. Find the nth largest number in a binary tree
  • Ans. 

    Find the nth largest number in a binary tree

    • Traverse the tree in-order and store the values in an array

    • Return the (n-1)th index of the sorted array in descending order

    • Use a max heap to keep track of the largest n elements

  • Answered by AI
  • Q7. Given 5 points in a plane, prove that there will be atleast two points such that their midpoint is an integer
  • Ans. 

    Prove that given 5 points in a plane, there will be at least two points such that their midpoint is an integer.

    • Consider the x and y coordinates of the 5 points.

    • If any two points have the same x and y coordinates, their midpoint will be an integer.

    • If not, consider the differences between the x and y coordinates of each pair of points.

    • If any two pairs have the same differences, their midpoints will be integers.

    • Otherwise,...

  • Answered by AI
  • Q8. Given a room with points pertaining to different groups, check whether the connection is planar or non­planar i.e. while connecting all the points in the same group, the wires of different groups should no...
  • Q9. Find the nth power of a number in shortest computational time
  • Ans. 

    Use exponentiation by squaring algorithm to find nth power of a number in shortest computational time.

    • Use recursion to divide the power by 2 and multiply the base accordingly

    • If power is odd, multiply the base with the result of recursive call

    • If power is negative, take reciprocal of base and make power positive

    • Handle edge cases like power=0 and base=0 or 1

    • Time complexity is O(log n)

  • Answered by AI
  • Q10. There is a roller which can have two types of wood blocks, 49 cm and 50 cm. Given two sensors 50 cm apart which call a function ring( ) whenever the sensor changes state, write the function ring( ) to cal...
  • Ans. 

    Function to calculate number of 49cm and 50cm wood blocks using two sensors 50cm apart.

    • Create a variable to store the count of 49cm blocks and another for 50cm blocks

    • Use a loop to continuously check the state of the sensors and increment the respective block count

    • Call the ring() function whenever the state of the sensors change

    • Return the count of both types of blocks

  • Answered by AI
  • Q11. Given a linked list, invert every two nodes in the list.Eg. Given a ­> b ­> c ­> d, result should be b ­> a ­> d ­> c
  • Ans. 

    Invert every two nodes in a linked list.

    • Create a temporary node to store the next node

    • Swap the positions of the current and next nodes

    • Set the current node's next to the temporary node

    • Move to the next pair of nodes and repeat until end of list

  • Answered by AI
  • Q12. A file or a directory can be represented as a node. The node has properties like ID no, parent ID no, name, no of children( 0 for a file). The entire file structure is represented as a linked list of the ...

Interview Preparation Tips

Round: Technical Interview
Experience: This interview went on for about an hour.

Round: Technical Interview
Experience: After three interviews, I was called for a final interview.He started by asking me about my best project and the drawbacks I faced in it. He asked about my internship and the working experience. This interview went on for more than an hour with him grilling me on two questions and their testcases.Q1. Given a linked list, invert every two nodes in the list.Eg. Given a ­> b ­> c ­> d, result should be b ­> a ­> d ­> cQ2. A file or a directory can be represented as a node. The node has properties like ID no, parent ID no, name, no of children( 0 for a file). The entire file structure is represented as a linked list of the nodes. Only thing known to us is that the parent directory will always come before the children in the LL. It need not come immediately before.We have to implement a GUI such that when I press on the + button next to the root directory, I see its children folders and files. The child directories have a + button next to them and can be expanded similarly.Write a pseudocode to implement this in minimum time and space.I suggested the use of a tree, wrote a code to convert it to a tree. He wanted a better way of finding children from the parent so I suggested a hash table comprising a hashing of the parent IDs to a LL of the children IDs. He was satisfied with the answer.

General Tips: 1. All interviews were mostly technical and the interviewers were calm and patient, though they didn’t provide help as such. Be confident but if you have no idea about a given question, mention that this is not your area of interest and see if they can ask another one.2. Even if you cannot find the exact code to a problem, it is fine because they are only looking at how intuitive you are withproblem solving.3. Don’t fib in your resume. They asked me a lot pertaining to my resume.4. Do data structures and operating system properly. They did not ask me any database ­related question.
Skills: Algorithm, Data structure, C++
College Name: na

Skills evaluated in this interview

Interview Questionnaire 

4 Questions

  • Q1. Given a compact data structure to store strings sequentially, one byte stores length l of the string, next l bytes contain the string characters. Write a code to insert the given string at the ith place, m...
  • Ans. 

    The code inserts a given string at the specified position in a compact data structure that stores strings sequentially.

    • To insert the string at the ith place, we need to shift all the strings after the ith position by the length of the new string.

    • We can use a loop to iterate through the data structure and find the ith position.

    • After finding the ith position, we can calculate the new length of the data structure and allo...

  • Answered by AI
  • Q2. How will you construct parse tree for ((a+b)*c)/d? what all data structures can you use?
  • Ans. 

    Constructing parse tree for ((a+b)*c)/d using data structures.

    • Use stack data structure to keep track of operators and operands.

    • Start with the innermost parentheses and work outwards.

    • Create a node for each operator and operand and link them together.

    • The root node will be the final result of the expression.

    • Example: ((a+b)*c)/d can be represented as / -> * -> + -> a, b, c, d.

  • Answered by AI
  • Q3. Given a function f that returns true or false based on whether the input string satisfies some hidden criterion C, write a function that verifies that all sub strings satisfy C
  • Q4. You hand over 'n' identical linked lists to n salespersons. After the day's work, these salesperson return the lists. Merge these lists such that all insertions, deletions, updates are taken care of, so th...
  • Ans. 

    Merge 'n' identical linked lists from 'n' salespersons to handle insertions, deletions, and updates.

    • Iterate through each linked list and merge them into a single linked list

    • Handle insertions, deletions, and updates by traversing the merged list and making necessary changes

    • Repeat the process for the next day by resetting the merged list

  • Answered by AI

Interview Preparation Tips

Round: Test
Experience: It was an online test. The company who hosted the test messed up with the interface, and a lot of people had trouble with a coding question that could not be solved because of the faulty interface. There was no retest.
The shortlisting was done after studying compile attempts, time devoted to various sections and other performance measures.

Round: Technical Interview
Experience: Told about myself, my interests, my internship projects and my work so far.
A few coding questions were asked too.
In the end, they asked if i have any questions.
Tips: Interviewers are friendly. Be calm, give your best.

General Tips: Start preparing early.
Develop priorities both sector wise and company wise.
Take sufficient water and food with you. Interviews can start at 4 am on the first day!
Have enough copies of resume and transcripts with you.
If you have been shortlisted for many companies, it is preferable to have a portfolio manager who manages your phone during the day and enables you to focus on the interviews.
College Name: IIT KANPUR

Skills evaluated in this interview

Software Developer Interview Questions Asked at Other Companies

asked in Amazon
Q1. Maximum Subarray Sum Problem Statement Given an array of integers ... read more
asked in Amazon
Q2. Minimum Number of Platforms Needed Problem Statement You are give ... read more
asked in Rakuten
Q3. Merge Two Sorted Arrays Problem Statement Given two sorted intege ... read more
asked in Cognizant
Q4. Nth Fibonacci Number Problem Statement Calculate the Nth term in ... read more
Q5. Find Duplicate in Array Problem Statement You are provided with a ... read more

Microsoft Corporation Interview FAQs

How many rounds are there in Microsoft Corporation Software Developer interview?
Microsoft Corporation interview process usually has 2-3 rounds. The most common rounds in the Microsoft Corporation interview process are Coding Test, Technical and One-on-one Round.
How to prepare for Microsoft Corporation Software Developer interview?
Go through your CV in detail and study all the technologies mentioned in your CV. Prepare at least two technologies or languages in depth if you are appearing for a technical interview at Microsoft Corporation. The most common topics and skills that interviewers at Microsoft Corporation expect are AWS, Cloud, Compliance, Computer science and Infrastructure.
What are the top questions asked in Microsoft Corporation Software Developer interview?

Some of the top questions asked at the Microsoft Corporation Software Developer interview -

  1. You are given infinite sequence of continuos natural numbers-1,2,3,4,5,6.........read more
  2. Which of the following numbers cannot be represented accurately in > binary? > ...read more
  3. You have 3 baskets- one containing apples, one oranges and the last containing ...read more
How long is the Microsoft Corporation Software Developer interview process?

The duration of Microsoft Corporation Software Developer interview process can vary, but typically it takes about less than 2 weeks to complete.

Tell us how to improve this page.

Microsoft Corporation Software Developer Interview Process

based on 29 interviews

4 Interview rounds

  • Coding Test Round - 1
  • Coding Test Round - 2
  • One-on-one Round
  • HR Round
View more
Microsoft Corporation Software Developer Salary
based on 442 salaries
₹12 L/yr - ₹46 L/yr
245% more than the average Software Developer Salary in India
View more details

Microsoft Corporation Software Developer Reviews and Ratings

based on 78 reviews

4.4/5

Rating in categories

4.3

Skill development

4.5

Work-life balance

4.2

Salary

4.3

Job security

4.4

Company culture

4.0

Promotions

4.1

Work satisfaction

Explore 78 Reviews and Ratings
Software Engineer
2k salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Senior Software Engineer
1.1k salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Software Engineer2
1k salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Consultant
599 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Support Engineer
552 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Explore more salaries
Compare Microsoft Corporation with

Google

4.4
Compare

Amazon

4.1
Compare

Deloitte

3.8
Compare

TCS

3.7
Compare
Did you find this page helpful?
Yes No
write
Share an Interview