Upload Button Icon Add office photos

Microsoft Corporation

Compare button icon Compare button icon Compare

Filter interviews by

Microsoft Corporation Developer Interview Questions and Answers

Updated 12 Sep 2015

7 Interview questions

A Developer was asked
Q. Given a binary tree, connect each node to the node on its right at the same level. Assume each node has an extra pointer to perform the connection.
Ans. 

Connect nodes to their right in a binary tree using an extra pointer.

  • Traverse the tree using level order traversal

  • For each node, connect its right child to the next node in the level

  • If there is no next node, set the right child to null

A Developer was asked
Q. Given an array of numbers, return the same array containing only unique elements.
Ans. 

Return an array with only unique elements

  • Use a Set to store unique elements

  • Loop through the array and add each element to the Set

  • Convert the Set back to an array and return it

Developer Interview Questions Asked at Other Companies

asked in HARMAN
Q1. Which programming language do you regularly use at work?
Q2. Given a 2D array, find an element which is the maximum in its col ... read more
asked in HARMAN
Q3. What steps do you take to ensure accurate project estimates?
Q4. Write a formula to display A if A is present, display B if B is p ... read more
Q5. Can you describe method overloading versus method overriding? Doe ... read more
A Developer was asked
Q. Design an elevator system with 5 elevators and 50 floors. What design considerations determine which elevator responds to a button press on a given floor?
Ans. 

Design considerations for an elevator system with 5 elevators and 50 floors.

  • Traffic patterns and peak hours should be analyzed to determine the optimal number of elevators to be in operation at any given time.

  • Elevators should be programmed to prioritize stops based on the direction of travel and the proximity of the requested floor to the elevator's current location.

  • The system should be designed to minimize wait t...

A Developer was asked
Q. Given a 2D array, find an element which is the maximum in its column and minimum in its row. You are assured that at least one such element exists. You may return any one if multiple such elements exist. Wr...
Ans. 

Find element in 2D array which is max in column and min in row with minimum comparisons

  • Iterate over rows and columns to find max and min elements respectively

  • Compare the max element of a column with the min element of its row

  • Return the element if it satisfies the condition

  • Consider edge cases like multiple elements satisfying the condition

What people are saying about Microsoft Corporation

View All
a software developer
5d
Just Microsoft things!
Offer sleeping pods in office Employees turn unproductive Revenue drops Fire Thousands of employees in the name of "AI Revolution"!
FeedCard Image
Got a question about Microsoft Corporation?
Ask anonymously on communities.
A Developer was asked
Q. Given two linked lists, find if they have a common node
Ans. 

Given two linked lists, check if they have a common node.

  • Traverse both lists and compare each node's memory address

  • Use a hash table to store memory addresses of nodes in one list and check for matches in the other list

  • If one list is shorter, traverse it first and then start traversing the longer list from the difference in length

A Developer was asked
Q. Given an array, find if it contains a majority element. An element is a majority element if it occurs more than 50% of times. Do it in O(n)
Ans. 

Find if an array has a majority element in O(n)

  • Iterate through the array and keep track of the count of each element

  • If the count of any element is greater than half the length of the array, return true

  • Otherwise, return false

A Developer was asked
Q. Given a sentence, write a function that returns the first word in the string and modifies the string to contain the remaining words.
Ans. 

Create a function to extract the first word from a sentence and modify the sentence to exclude that word.

  • Define a function that takes a string as input.

  • Use string methods to split the sentence into words.

  • Return the first word and modify the original string to exclude it.

  • Example: For input 'Hello World', return 'Hello' and modify to 'World'.

  • Handle edge cases like empty strings or single-word inputs.

Are these interview questions helpful?

Microsoft Corporation Developer Interview Experiences

1 interview found

Developer Interview Questions & Answers

user image Anonymous

posted on 12 Sep 2015

Interview Questionnaire 

8 Questions

  • Q1. Given a binary tree (not necessarily complete), connect a node to the node to its right (at the same level). Assume you have an extra pointer in the node to perform the connection
  • Ans. 

    Connect nodes to their right in a binary tree using an extra pointer.

    • Traverse the tree using level order traversal

    • For each node, connect its right child to the next node in the level

    • If there is no next node, set the right child to null

  • Answered by AI
  • Q2. Given a sentence, write a function, which when called, would return the first word in the string and modify the string to contain from second to the last word
  • Ans. 

    Create a function to extract the first word from a sentence and modify the sentence to exclude that word.

    • Define a function that takes a string as input.

    • Use string methods to split the sentence into words.

    • Return the first word and modify the original string to exclude it.

    • Example: For input 'Hello World', return 'Hello' and modify to 'World'.

    • Handle edge cases like empty strings or single-word inputs.

  • Answered by AI
  • Q3. Design an elevator system, where there are 5 elevators and 50 floors. What would be the design considerations on which elevator should come when a button is pressed on a given floor?
  • Ans. 

    Design considerations for an elevator system with 5 elevators and 50 floors.

    • Traffic patterns and peak hours should be analyzed to determine the optimal number of elevators to be in operation at any given time.

    • Elevators should be programmed to prioritize stops based on the direction of travel and the proximity of the requested floor to the elevator's current location.

    • The system should be designed to minimize wait times ...

  • Answered by AI
  • Q4. Differences between threads, processes and many such questions
  • Q5. Given two linked lists, find if they have a common node
  • Ans. 

    Given two linked lists, check if they have a common node.

    • Traverse both lists and compare each node's memory address

    • Use a hash table to store memory addresses of nodes in one list and check for matches in the other list

    • If one list is shorter, traverse it first and then start traversing the longer list from the difference in length

  • Answered by AI
  • Q6. Given an array, find if it contains a majority element. An element is a majority element if it occurs more than 50% of times. Do it in O(n)
  • Ans. 

    Find if an array has a majority element in O(n)

    • Iterate through the array and keep track of the count of each element

    • If the count of any element is greater than half the length of the array, return true

    • Otherwise, return false

  • Answered by AI
  • Q7. Given a 2 dim array, find an element which is the maximum in its column and minimum in its row. You are assured that atleast one such element exists. You may return any one if multiple such elements exist....
  • Ans. 

    Find element in 2D array which is max in column and min in row with minimum comparisons

    • Iterate over rows and columns to find max and min elements respectively

    • Compare the max element of a column with the min element of its row

    • Return the element if it satisfies the condition

    • Consider edge cases like multiple elements satisfying the condition

  • Answered by AI
  • Q8. Given an array of numbers, return the same array containing only unique elements in the array
  • Ans. 

    Return an array with only unique elements

    • Use a Set to store unique elements

    • Loop through the array and add each element to the Set

    • Convert the Set back to an array and return it

  • Answered by AI

Interview Preparation Tips

Round: Test
Experience: 1 written test + 3 rounds of technical interviews
For final offer: 3 rounds of technical interview

College Name: Veermata Jijabai Technological Institute, Mumbai [ VJTI ]

Skills evaluated in this interview

Interview questions from similar companies

I applied via Company Website and was interviewed before Oct 2019. There were 4 interview rounds.

Interview Questionnaire 

1 Question

  • Q1. 1. Core Java - OOPS features, Abstract classes and Interface, Inner Classes, String and Object Class, Equals and HashCode methods, Runtime and Compile time exception, Method overloading and overriding, Cus...

Interview Preparation Tips

Interview preparation tips for other job seekers - 1. Clear Core java concepts firmly
2. Basic DB queries
3. Basic Unix commands

Developer Interview Questions Asked at Other Companies

asked in HARMAN
Q1. Which programming language do you regularly use at work?
Q2. Given a 2D array, find an element which is the maximum in its col ... read more
asked in HARMAN
Q3. What steps do you take to ensure accurate project estimates?
Q4. Write a formula to display A if A is present, display B if B is p ... read more
Q5. Can you describe method overloading versus method overriding? Doe ... read more

I applied via Naukri.com and was interviewed in Mar 2020. There were 4 interview rounds.

Interview Questionnaire 

2 Questions

  • Q1. What is web service flow
  • Ans. 

    Web service flow is the sequence of steps involved in the communication between a client and a server over the internet.

    • Web service flow involves a client sending a request to a server

    • The server processes the request and sends a response back to the client

    • The response can be in various formats such as XML, JSON, or plain text

    • Web service flow can be synchronous or asynchronous

    • Examples of web services include RESTful API...

  • Answered by AI
  • Q2. How to check ports in Solaris or linux machine
  • Ans. 

    To check ports in Solaris or Linux machine, use the netstat command.

    • Open the terminal and type 'netstat -an' to display all open ports.

    • Use 'netstat -an | grep ' to check if a specific port is open.

    • To check listening ports, use 'netstat -an | grep LISTEN'.

    • For Solaris, use 'netstat -an | grep .' instead of '| grep '.

  • Answered by AI

Interview Preparation Tips

Interview preparation tips for other job seekers - Total pathetic experience. What job description is given to you, doesn't matters because you won't be asked for that. Your resume will get shortlisted and then it doesn't matter what u have covered up in your career path, because interview rounds will consist of questions out of your scope. Your resume doesn't needs to be shortlisted at first end if it doesn't suit thier needs. HR people, they are on another level. You share your resume to them, and they will never ever reply back to you. Not a single HR, but it seems everyone has same culture. You keep trying to connect them for support. But they will just keep finding smarter ways to avoid.

Skills evaluated in this interview

I applied via Campus Placement and was interviewed before Nov 2021. There were 3 interview rounds.

Round 1 - Resume Shortlist 
Pro Tip by AmbitionBox:
Keep your resume crisp and to the point. A recruiter looks at your resume for an average of 6 seconds, make sure to leave the best impression.
View all tips
Round 2 - Aptitude Test 

Numerical and logical aptitude test

Round 3 - Coding Test 

There are 5 rounds on datastructure and algorithm

Interview Preparation Tips

Interview preparation tips for other job seekers - Nice hr and all team is suportive
Good and smoth interview experiance

What people are saying about Microsoft Corporation

View All
a software developer
5d
Just Microsoft things!
Offer sleeping pods in office Employees turn unproductive Revenue drops Fire Thousands of employees in the name of "AI Revolution"!
FeedCard Image
Got a question about Microsoft Corporation?
Ask anonymously on communities.

Interview Questionnaire 

1 Question

  • Q1. Spring Collections Difference between list and set What is sorted mean in hashed set java Serialization Exceptions How can you give an exception to caller method Unix- how to move a folder without g...
  • Ans. 

    Interview questions for Software Developer related to Spring, Collections, Serialization, Exceptions, Unix, Annotations, Json, Build tools, Restful services, and more.

    • List and Set are both collection interfaces in Java. List allows duplicates and maintains insertion order while Set doesn't allow duplicates and doesn't maintain any order.

    • Sorted in Hashed Set means that the elements are stored in a sorted order based on ...

  • Answered by AI

Skills evaluated in this interview

I appeared for an interview before Mar 2021.

Round 1 - Face to Face 

(2 Questions)

Round duration - 45 minutes
Round difficulty - Medium

Technical Interview round with questions on DSA.

  • Q1. 

    Reverse Words in a String: Problem Statement

    You are given a string of length N. Your task is to reverse the string word by word. The input may contain multiple spaces between words and may have leading o...

  • Ans. 

    Reverse words in a string while handling leading, trailing, and multiple spaces.

    • Split the input string by spaces to get individual words

    • Reverse the order of the words

    • Join the reversed words with a single space in between

    • Handle leading, trailing, and multiple spaces appropriately

  • Answered by AI
  • Q2. 

    Reverse a Stack Using Recursion

    You are given a stack of integers. Your task is to reverse the stack using recursion without using any extra space other than the internal stack space used due to recursion...

  • Ans. 

    Reverse a stack using recursion without using any extra space other than the internal stack space.

    • Use recursion to pop all elements from the original stack and store them in function call stack.

    • Once the stack is empty, push the elements back in reverse order.

    • Base case of recursion should be when the original stack is empty.

  • Answered by AI
Round 2 - Face to Face 

(2 Questions)

Round duration - 45 minutes
Round difficulty - Medium

Technical Interview round with questions on DSA.

  • Q1. 

    Convert a Binary Tree to its Mirror Tree

    Given a binary tree, convert this binary tree into its mirror tree. A binary tree is a tree in which each parent node has at most two children. The mirror of a bin...

  • Ans. 

    Convert a binary tree to its mirror tree by interchanging left and right children of all non-leaf nodes.

    • Traverse the binary tree in a recursive manner.

    • Swap the left and right children of each non-leaf node.

    • Continue this process until all nodes have been processed.

  • Answered by AI
  • Q2. 

    Remove Nth Node from End of Linked List

    You are given a singly linked list with 'N' nodes, each containing integer data, and an integer 'K'. Your goal is to remove the 'K'th node counting from the end of ...

  • Ans. 

    Remove the Kth node from the end of a singly linked list.

    • Use two pointers approach to find the Kth node from the end.

    • Handle edge cases like removing the head node or removing the last node.

    • Update the pointers to remove the Kth node and reconnect the list.

  • Answered by AI
Round 3 - HR 

Round duration - 30 minutes
Round difficulty - Easy

Typical Managerial round.

Interview Preparation Tips

Eligibility criteriaAbove 6 months of experience24/7 customer private limited interview preparation:Topics to prepare for the interview - Data Structures, Algorithms, System Design, Aptitude, OOPSTime required to prepare for the interview - 5 monthsInterview preparation tips for other job seekers

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application resume tips for other job seekers

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Final outcome of the interviewSelected

Skills evaluated in this interview

Interview Preparation Tips

General Tips: I asked my seniors about the interview process. Their guidelines were very helpful. Always try to bring the interviewer into your comfort zone. Also be confident and expressive while explaining. Explain your thought process while solving. Even though you don't get the solution the thought process might be very important for your selection.
College Name: NIT SURATHKAL
Are these interview questions helpful?

Interview Preparation Tips

Round: Test
Experience: Oracle had an online test which includes 3
Sections:
1. Programming: basic C++/java programming + data structure. One need to have good hand over oops
to score well in this section.

2. Aptitude: General Aptitude Questions

3. General Maths: Very simple maths problem (+2 level) but needs very very good speed.
Tips: Individual cutoff was not declared, but different cutoff for different profile is expected.
Oracle has no GD round.

Round: Interview
Experience: In 2nd round of interview, there was more programming, less resume based question and more emphasis on will I be comfortable in an IT sector. Some apti questions were also asked.

Round: Interview
Experience: 1st round was completely on resume based. Each and every project and intern is discussed in detail. Most of the extracurricular activities were also discussed. In the 1st interview, some basic program like fibonacci series by recursion, star pattern by loop etc were asked.

Round: Interview
Experience: Next round was HR. I was asked about the earlier 2 interviews and some basic HR questions.

College Name: IIT Roorkee

Interview Preparation Tips

Round: Test
Experience: The sections were Quantitative, Logical, Verbal and Computer Science.The three sections contained very basic questions of general aptitude while the Computer Science section contained questions on Database Management, OS, SQL and Programming Aptitude.

Round: Test
Experience: The question was to program a logic to test the correctness of a solved sudoku. We were allowed to code in C++, Java, C or pseudo code.

Round: Technical Interview
Experience: Were asked simple questions and program them like reversing string without temporary variables, finding the earlier date when entered as string and finding the difference in number of days between them.
I was asked to explain him my internship project in great detail and above all one should be prepared to answer the question 'Why IT?' if from a non IT background. Then I was asked to program a logic for 'Search and replace" tool of MS Word.

Round: HR Interview
Experience: Was asked about my background in detail and stressed again and again on 'Why IT?'. Then he asked me to prepare a summary on the merits and demerits of various Employee Data Management techniques for an organisation. For the end of the interview you should have a question which you would ask to the interviewer.

General Tips: Don't try to over emphasize the correctness of your logic if the interviewer finds a glitch. It irritates him. Be interactive in your HR round. In our case it was the VP of Oracle India who took the final round. So I asked him about his experience in the company. He was very happy to share it with me. But asses your interviewer before you put forth these queries cause your interviewer might not be as jolly as mine was.
Skills:
College Name: NIT Surathkal

Interview Preparation Tips

Round: Resume Shortlist
Tips: If you think it is worth it, write it in the resume.

Round: Technical Interview
Experience: I discussed a political party in one such interview in another company. He was impressed rather inspired.
Tips: All they are looking for in this interview is that you have a basic aptitude

Round: HR Interview
Tips: Try to be as real as possible. They know people and have great deal of experience. You cannot fake it.

General Tips: Peace yoo
College Name: IIT BOMBAY

Microsoft Corporation Interview FAQs

How to prepare for Microsoft Corporation 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 microsoft, Development Management, Partner Development, Cloud and SQL.
What are the top questions asked in Microsoft Corporation Developer interview?

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

  1. Given a 2 dim array, find an element which is the maximum in its column and min...read more
  2. Design an elevator system, where there are 5 elevators and 50 floors. What woul...read more
  3. Given a sentence, write a function, which when called, would return the first w...read more

Tell us how to improve this page.

Microsoft Corporation Developer Salary
based on 20 salaries
₹13.9 L/yr - ₹48 L/yr
322% more than the average Developer Salary in India
View more details
Software Engineer
2.5k salaries
unlock blur

₹24.9 L/yr - ₹44 L/yr

Senior Software Engineer
1.4k salaries
unlock blur

₹35.3 L/yr - ₹73.9 L/yr

Software Engineer2
1.2k salaries
unlock blur

₹33 L/yr - ₹60 L/yr

Software Developer
1.1k salaries
unlock blur

₹24.5 L/yr - ₹45.1 L/yr

Support Engineer
607 salaries
unlock blur

₹14.3 L/yr - ₹24.5 L/yr

Explore more salaries
Compare Microsoft Corporation with

Google

4.4
Compare

Amazon

4.0
Compare

Deloitte

3.7
Compare

TCS

3.6
Compare
write
Share an Interview