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

Software Developer Interview Questions & Answers

user image Akshay Utture

posted on 24 Aug 2015

I applied via Campus Placement

Interview Preparation Tips

Round: Test
Experience: Easy
Tips: Read data strucuctures and Alogorithms
Duration: 30 minutes
Total Questions: 15

Round: Group Discussion
Experience: Good.
Tips: Think of design
Duration: 60 minutes

Round: Technical Interview
Experience: Good
Tips: Read data structures and algorithms

General Tips: Learn Data structures and Algorithms welll.
Skill Tips: Know Data structures and Algorithms
Skills: Data structures and Algorithms, General coding and problem solving
Duration: 2
College Name: IIT Madras

I applied via Referral

Interview Questionnaire 

3 Questions

  • Q1. Given two sorted arrays, say A and B, find A ­ B. Here, A ­ B means all those elements present in A but not in B. The expected time complexity was O(m + n), if A is of size m and B is of size n
  • Ans. 

    Find A-B of two sorted arrays A and B in O(m+n) time complexity.

    • Create two pointers, one for each array, and compare the elements at those pointers.

    • If the element in A is smaller, add it to the result array and move the A pointer forward.

    • If the element in B is smaller, move the B pointer forward.

    • Repeat until one of the pointers reaches the end of its array.

    • Add any remaining elements in A to the result array.

    • Time comple...

  • Answered by AI
  • Q2. 1. Write a routine to output the elements of the inorder traversal of a binary tree one by one in its each call. eg: Assuming the inorder traversal is 1, 2, 3, 4, 5, the routine should return 1 in its fi...
  • Ans. 

    The routine should output the elements of the inorder traversal of a binary tree one by one in each call.

    • Implement an inorder traversal algorithm recursively

    • Use a global variable or pass a reference to keep track of the current element

    • Call the routine repeatedly to get the next element in each call

  • Answered by AI
  • Q3. Given a set of courses along with the prerequisite courses for these courses, write a program to find the minimum number of semesters required to wrap up all the courses
  • Ans. 

    Program to find minimum semesters required to complete courses with prerequisites

    • Create a graph with courses as nodes and prerequisites as edges

    • Use topological sorting to find the order of courses to be taken

    • Calculate the minimum number of semesters based on the order obtained

    • Handle cases where there are cycles in the graph

  • Answered by AI

Interview Preparation Tips

Skills:
College Name: NA

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

Interview Preparation Tips

General Tips: Before going for the interviews, take a sheet of paper and write an error free code, with extremely well named variables and optimized runtime each on Matrices, Linked List and Binary Tree. This will ensure that you have confidence and don't feel rusty while writing the code. Check your code twice to make it error free before showing the interviewer.
Skill Tips: geeksforgeeks is the most valuable site. The questions are generally taken from there. Careercup.com has the most common questions asked by Microsoft. Try to even brush up on OS concepts. Some interviewers ask that too. Practice all questions on linked list. This is generally the first interview question.
College Name: NIT SURATHKAL

Interview Preparation Tips

General Tips: Don't ignore aptitude because it is really important. Never give up on any question in interview. Tell your interviewer anything you know about the question even if it is too simple to tell. Be confident.
College Name: NIT SURATHKAL

Microsoft Corporation interview questions for designations

 Software Developer Intern

 (24)

 Software Developer II

 (3)

 Senior Software Developer

 (2)

 Developer

 (1)

 Software Engineer

 (65)

 Software Engineer2

 (7)

 Software Intern

 (1)

 Lead Developer

 (1)

Interview Preparation Tips

General Tips: 0. The most important thing. Know your level. Improve yourself by practicing more and be well aware of how smart you are. Wishful thinking can only get you so far.1. Writing fluent and optimized code is an art. I was lucky because I have been coding for a long time. If your coding skills aren't great, practice! I answered one crucial question completely wrong and still got through because of this skill.2. If you know an answer to a question, do not answer it immediately. Try to derive that answer from scratch and understand it before you go about blurting out the answer out of excitement. Let it look like a challenge.3. Learn External Sorting and Kadane's algorithm.4. Learn some basic OS facts like details about a program stack and what not.Make a CV right now! Compress it to one page. No one cares about your extra-curricular activities as much as you do. Include relevant details. Selection Procedure Preparation
College Name: NIT SURATHKAL

Get interview-ready with Top Microsoft Corporation Interview Questions

Interview Preparation Tips

General Tips: As I got PPO from the company it was little better-luck for me as I escaped from On-Campus Competition.But yeah for getting intern and then PPO it was well challenging. But you can enjoy in parallel with little continuous hard work and smart preparation/work-out. Better find what will be asked in interview then learn accordingly concepts instead running behind CGPA(its enough 8- 8.5). You might get disappointed some time just try to catch plus from it and move forward. I have seen cases a student got rejected in one company placed in better one. You never know where is your destination. Better fix multiple than one.Now the pattern for Aptitude is changing. You will be given 60-90 min. and you have to code solutions for problems. Many of our batch-mates were not used to it. I was also rejected in more than 2 companies just because of not having good efficiency in handing online test. Be ready well before for such cases. Follow code-chef etc. Your preference for preparation should be DSA>OS>DBMS
Skill Tips: For Data-Structure and Algorithms preparation I followed NPTEL lectures and Corman. Whatever concept you learn from these try to implement using C/C++ or any language you like. It improved my coding as I started writing more Structured/Modular code which makes you more impressive in interviews. For more problems refer Careercup.com and GeekforGeeks.org. It was really luck for me during both intern and PPI interview I was asked questions from these websites. As these are favorites for all interviewers. Its better to write code first on paper than on compiler it reduces bugs/errors like NULL-pointer error. Aptitude C/C++ follow any good book and go through once. For C refer Dennis Ritchie. For DBMS/OS follow ppts or their standard textbooks. Try to learn as many concept as possible. Don't depend on your prof did he teach or not.
College Name: NIT SURATHKAL

Interview Preparation Tips

General Tips: The interviews take up almost your complete day. Each round lasts for 45 min .The level of difficulty keeps increasing with each round. It is a bit exhausting and by the time you get to final round but trust me guys it's worth it.
Skill Tips: For Microsoft your code should be perfect and written in perfect programming style
College Name: NIT SURATHKAL

Interview Questionnaire 

5 Questions

  • Q1. Find the nth element in a tribonacci(a variation of Fibonacci) series. t(n)=t(n-1)+t(n-2)+t(n-3)
  • Ans. 

    Find the nth element in a tribonacci series.

    • Use recursion to solve the problem.

    • Handle base cases for n=0, n=1, and n=2.

    • For n>2, use the formula t(n)=t(n-1)+t(n-2)+t(n-3).

    • Return the value of t(n) for the given n.

  • Answered by AI
  • Q2. Given three sides of a triangle, find whether a triangle is right angled, isosceles, equilateral, scalene in nature
  • Ans. 

    Given three sides of a triangle, determine its nature.

    • Check if any two sides are equal to determine if it's isosceles

    • Check if all three sides are equal to determine if it's equilateral

    • Use Pythagoras theorem to check if it's right angled

    • If none of the above, it's a scalene triangle

  • Answered by AI
  • Q3. What are the products that I have used of Microsoft? Why I would like to join Microsoft?
  • Ans. 

    I have used Microsoft Office, Windows OS, Visual Studio, and Azure. I want to join Microsoft because of its innovative culture and impact on the tech industry.

    • I have used Microsoft Office for word processing, spreadsheet management, and presentation creation.

    • I have used Windows OS for personal and professional use.

    • I have used Visual Studio for software development.

    • I have used Azure for cloud computing and hosting.

    • I wan...

  • Answered by AI
  • Q4. He then asked me to rate myself on a scale of 10 in any of my favorite language
  • Q5. Questions based on testing was asked like how do you test your code for bugs

Interview Preparation Tips

Round: Test
Experience: It was an online round conducted by cocubes. It had about 15 questions and time allotted was 30 minutes.
Duration: 30 minutes
Total Questions: 1

Round: Test
Experience: Note: Only allowed language was C.
Duration: 60 minutes

Round: Behavioural Interview
Experience: The interview was scheduled at around 6:00 pm. It started with a brief intro by the interviewer followed by mine. He then asked some behavioral questions. What are the products that I have used of Microsoft? Why I would like to join Microsoft? He then asked me to rate myself on a scale of 10 in any of my favorite language. Questions based on testing was asked like how do you test your code for bugs.
He gave a scenario with details as follows:
Suppose you are given a tablet and you need to explain your great great grandfather the features of it so that he understands what you say and thinks it as a useful gadget. Assuming your grandfather has no idea about gadgets like mobile, computer etc.
He also asked me to mention my strength and weakness. No such algorithmic questions were asked in this round.

Round: Technical Interview
Experience: This was the last round.
It was a group coding round.We were made to sit around a round table with paper and pencil and the HR gave us two questions to code.

General Tips: The interviewer wanted a clean code with minimum cuts as possible. So I would suggest practice writing code on a piece of paper. Puzzles were also part of interview
Skills: c, trees, string, data structures
College Name: NA

Interview Questionnaire 

8 Questions

  • Q1. “Compress a text string in place”. Having seen the famous string expansion in place problem many times, I promptly said run length encoding (i.e. compress aaaaaabbbbbccc to a6b5c3 for example). He asked me...
  • Ans. 

    Code a run length encoding algorithm to compress a text string in place.

    • Use a loop to iterate through the string and count consecutive characters

    • Create a new string to store the compressed version of the original string

    • Add the character and its count to the new string

    • Compare the length of the new string to the original string to determine if compression was successful

  • Answered by AI
  • Q2. Given a binary search tree and a no. N in the tree, print the leftmost node at the same level as N
  • Ans. 

    Print the leftmost node at the same level as a given node in a binary search tree.

    • Traverse the tree level by level using BFS

    • Keep track of the leftmost node at each level

    • Return the leftmost node at the level of the given node

    • If the given node is not found, return null

  • Answered by AI
  • Q3. WAP to print a matrix spirally. I told him I knew the problem so he skipped it
  • Q4. Search for an element in a rotated sorted array (of course in sublinear time!)
  • Ans. 

    Search for an element in a rotated sorted array in sublinear time.

    • Use binary search to find the pivot point where the array is rotated.

    • Determine which half of the array the target element is in.

    • Perform binary search on the appropriate half of the array to find the target element.

    • Time complexity is O(log n).

  • Answered by AI
  • Q5. Nice DP problem. Given an amount and an array containing possible coin denominations, determine the smallest no of coins in which the amount may be formed. Assume you have infinite units of each denominati...
  • Ans. 

    Given an amount and coin denominations, find the smallest no of coins to form the amount.

    • Use dynamic programming to solve the problem

    • Create a table to store the minimum number of coins required for each amount

    • Iterate through the denominations and update the table accordingly

    • Return the minimum number of coins required for the given amount

  • Answered by AI
  • Q6. Given a linked list, swap its nodes pairwise. A good test of pointer manipulation with many edge
  • Q7. Given an array, bring all its distinct elements to the top in any order, the rest of the array is not
  • Ans. 

    Move all distinct elements of an array to the top in any order.

    • Create a new array to store distinct elements

    • Loop through the original array and check if element is already in new array

    • If not, add it to the new array and remove it from the original array

    • Concatenate the new array with the remaining elements of the original array

  • Answered by AI
  • Q8. Given a matrix, find an element that is max in its row and min in its col. The actual question (after I wrote the function) was whether there can be more than one such element in the matrix,
  • Ans. 

    There can be multiple such elements in the matrix.

    • Multiple elements can be max in their row and min in their col

    • The function should return all such elements

    • The elements can be in different rows and columns

  • Answered by AI

Interview Preparation Tips

Round: Test
Duration: 60 minutes

Round: Technical Interview
Experience: 1. After that he asked me a problem.“Compress a text string in place”. Having seen the famous string expansion in place problem many times, I promptly said run length encoding (i.e. compress aaaaaabbbbbccc to a6b5c3 for example). He asked me to code it and write a few test cases for it. The most important test case in my opinion is the following:
a -> a and not a1, i.e. for a single occurrence of a character, do not write its count – the reason
being that the string, instead of getting compressed, gets expanded in that case.
Tips: nitially he started with a discussion of my final year project. After about 10 minutes of discussion, I think he concluded it was too early for me to know my own project topic well. Since the area of my project is network security, the rest of the discussion revolved around it. He went into the details of cryptography and attacks like buffer overflow, asking me to basically just assure him I knew what I was speaking (discuss those things orally, and occasionally write small snippets). One particularly ridiculous part of this interview that I happen to remember was me having uttered the term ‘canary bit’, followed by him torturing me around it for about 10 minutes, he asked me what exactly it is, how I thought it could be implemented, if I could draw a rudimentary design of such a subsystem and all. The whole discussion went on for say 50 minutes or so.

Round: Technical Interview
Experience: This was a nice, pure problem-solving round.
First, he asked me the famous “Tell me about yourself” and “How were your earlier rounds”
questions. But they were just ice-breakers.

Round: Technical Interview
Experience: This was the most enjoyable round. The interviewer was a final round specialist!
First, he asked me about my internship, which I explained to him. He discussed it for hardly 10
minutes.
Then he started his attack! (Yes, it literally felt like an attack – just like Ronnie O’Sullivan There were three questions here:
Q1. Given a linked list, swap its nodes pairwise. A good test of pointer manipulation with many edge
Q2. Given an array, bring all its distinct elements to the top in any order, the rest of the array is not
important. First I suggested in O(n) space. Then he asked me to do it without extra space. I
needed a sorted array for that, which he asked me to assume. The rest of it is based on swapping
elements in order to bring the required elements to the top.
Q3. Given a matrix, find an element that is max in its row and min in its col. The actual question
(after I wrote the function) was whether there can be more than one such element in the matrix,
assuming all elements are distinct. Wrote a small proof that there cannot. He literally asked for a
formal proof “as I would write it in an exam”!Finally I got placed. I was on cloud 9.. All the best

Skills: Data srtructure, Cryptography, Algorithm
College Name: NA

Skills evaluated in this interview

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. 

    The question asks to add two numbers represented as linked lists and return the sum as a linked list.

    • Traverse both linked lists simultaneously, adding the corresponding digits and carrying over the carry.

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

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

    • Consider cases where the sum has an additional carry digit at the end.

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

    The task is to compress a given string by replacing consecutive repeated characters with the character followed by the count of repetitions.

    • Iterate through the string and keep track of the current character and its count.

    • If the next character is the same as the current character, increment the count.

    • If the next character is different, append the current character and its count to the result string.

    • Return the compressed

  • Answered by AI
  • Q4. Given a node in a binary tree, find the leftmost node in the same level
  • 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 in the level of the given node

  • Answered by AI
  • Q5. 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
  • Q6. Insert an element into a sorted circular linked list. (Consider all cases, inserting in the beginning, end and middle)
  • Ans. 

    Insert an element into a sorted circular linked list.

    • Find the correct position to insert the element based on its value

    • Update the pointers of the previous and next nodes to include the new node

    • Handle special cases such as inserting at the beginning or end of the list

    • Example: Inserting 5 into a list with values 1, 3, 4, 6, 7 would result in 1, 3, 4, 5, 6, 7

  • 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 differences that are both even or both odd, their midpoints will ...

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

    The function ring() calculates the number of blocks of both types based on sensor state changes.

    • Create a variable to keep track of the number of 49 cm blocks

    • Create another variable to keep track of the number of 50 cm blocks

    • Initialize both variables to 0

    • Whenever the sensor changes state, increment the corresponding block variable

    • Return the count of both block types as an array of strings

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

    The given linked list needs to be inverted in pairs of two nodes.

    • Iterate through the linked list, swapping every two adjacent nodes.

    • Keep track of the previous node to update the next pointers correctly.

    • Handle the edge cases of odd number of nodes or empty 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: After 3 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 workingexperience. 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 ­> c
Q2. 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.

Skills: Algortihm, Data structure, C++
College Name: Na

Skills evaluated in this interview

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