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 Engineer Interview Questions, Process, and Tips for Freshers

Updated 21 Jan 2025

Top Microsoft Corporation Software Engineer Interview Questions and Answers for Freshers

  • Q1. You have a cuboid (m*n*p) each block of the cuboid is having a metallic ball. Now we are passing X-ray from front face and getting a bool matrix1 of m*p the elements are ...read more
  • Q2. Write a program to store a tree on a file. Also write code to reconstruct the tree from that file. Think of efficient techniques
  • Q3. Given a string of unknown length, what is a good approach to find n-k th element from last
View all 12 questions

Microsoft Corporation Software Engineer Interview Experiences for Freshers

8 interviews found

Interview experience
3
Average
Difficulty level
Moderate
Process Duration
-
Result
No response

I was interviewed in Jun 2024.

Round 1 - Technical 

(2 Questions)

  • Q1. Variation of aggressive cows problem (requires binary search)
  • Ans. 

    Use binary search to find the minimum distance to escape aggressive cows in a field.

    • Implement a function to check if cows can be placed with a minimum distance in a field.

    • Use binary search to find the minimum distance that satisfies the condition.

    • Keep track of the maximum distance found so far while performing binary search.

  • Answered by AI
  • Q2. Variation of 2 sum problem
  • Ans. 

    Find two numbers in an array that add up to a target sum.

    • Use a hash map to store the difference between the target sum and each element.

    • Iterate through the array and check if the current element's complement exists in the hash map.

    • Return the indices of the two numbers that add up to the target sum.

  • Answered by AI
Round 2 - One-on-one 

(2 Questions)

  • Q1. Was told that this round would be an LLD. But it felt more like HLD or technical HM round Questions: grilled on microservice vs monolith architectures, how to migrate to microservice, when to migrate to mi...
  • Q2. Design a rest API
  • Ans. 

    Design a REST API for a software engineer interview

    • Define the resources and endpoints

    • Use HTTP methods for CRUD operations (GET, POST, PUT, DELETE)

    • Implement authentication and authorization

    • Use JSON for data exchange format

    • Include error handling and status codes

  • Answered by AI
Interview experience
5
Excellent
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Coding Test 

2 DSA qns on codility

Round 2 - Technical 

(2 Questions)

  • Q1. Cs fundamentals
  • Q2. DSA qn on graphs
  • Ans. 

    Graphs are data structures that consist of nodes and edges connecting them.

    • Graphs can be directed or undirected.

    • Common graph traversal algorithms include BFS and DFS.

    • Examples of graphs include social networks, road networks, and computer networks.

  • Answered by AI

Skills evaluated in this interview

Software Engineer Interview Questions Asked at Other Companies for undefined

asked in Capgemini
Q1. In a dark room,there is a box of 18 white and 5 black gloves. You ... read more
asked in Capgemini
Q2. How can you cut a rectangular cake in 8 symmetric pieces in three ... read more
Q3. Split Binary String Problem Statement Chintu has a long binary st ... read more
asked in TCS
Q4. What is the reason that the Iterative Waterfall model was introdu ... read more
asked in Wipro
Q5. Knapsack Problem Statement There is a potter with a limited amoun ... read more
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 - Coding Test 

PRACTISE CODING properly..........

Round 3 - Technical 

(3 Questions)

  • Q1. BE TECH SAVY.............................
  • Q2. WHAT IS YOUR N
  • Q3. WHO ARE YOU?...........

Interview Preparation Tips

Interview preparation tips for other job seekers - JUST GIVE YOUR INTERVIEW PROPERLY.......................
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 - Technical 

(2 Questions)

  • Q1. Implement stack using linkedlist
  • Ans. 

    Implementing stack using linked list

    • Create a Node class with data and next pointer

    • Create a Stack class with top pointer

    • Implement push() method to add element to top of stack

    • Implement pop() method to remove element from top of stack

    • Implement peek() method to return top element without removing it

  • Answered by AI
  • Q2. Implement priority queue
  • Ans. 

    Priority queue is a data structure that stores elements with priority levels and retrieves them in order of priority.

    • Elements are added with a priority level and retrieved in order of priority

    • Can be implemented using a heap data structure

    • Operations include insert, delete, and peek

    • Can be used in algorithms such as Dijkstra's shortest path algorithm

  • Answered by AI

Interview Preparation Tips

Interview preparation tips for other job seekers - prepare DSA well and also prepare for behavioral round

Skills evaluated in this interview

Microsoft Corporation interview questions for designations

 Senior Software Engineer

 (28)

 Software Development Engineer

 (11)

 Software Engineer Intern

 (5)

 Associate Software Engineer

 (2)

 Principal Software Engineer

 (2)

 Software Engineer II

 (2)

 Software Development Engineer II

 (6)

 Senior Software Engineer 2

 (2)

Interview experience
5
Excellent
Difficulty level
Hard
Process Duration
Less than 2 weeks
Result
Selected Selected

I applied via Approached by Company and was interviewed before Apr 2023. There were 2 interview rounds.

Round 1 - Coding Test 

Heavy Dsa was found minimum leetcode hard

Round 2 - Technical 

(1 Question)

  • Q1. Leeetcode medium questions

Interview Preparation Tips

Interview preparation tips for other job seekers - Leetcode practoce

Get interview-ready with Top Microsoft Corporation Interview Questions

Software Engineer Interview Questions & Answers

user image Mohd Azharuddin

posted on 15 Nov 2015

I applied via Campus Placement

Interview Questionnaire 

2 Questions

  • Q1. You have a Binary tree having numbers>=0 and a numeber N. Print all downwards paths from any node having the sum of elements equal to N
  • Ans. 

    Print all downward paths from any node in a binary tree with sum of elements equal to N.

    • Traverse the binary tree and keep track of the sum of elements in the path from root to current node.

    • If the sum equals N, print the path from root to current node.

    • Recursively traverse the left and right subtrees with updated sum.

    • Use a stack to keep track of the current path being traversed.

    • Example: Binary tree with root 1, left chil...

  • Answered by AI
  • Q2. You have a cuboid (m*n*p) each block of the cuboid is having a metallic ball. Now we are passing X-ray from front face and getting a bool matrix1 of m*p the elements are set if there is a black spot.(as...
  • Ans. 

    Yes, it is possible to get the accurate result from the given data.

    • The coordinates (i,j,k) where metallic balls are present can be determined by finding the set elements in both matrix1 and matrix2.

    • Additional data is not required as the given data is sufficient to determine the coordinates.

    • The coordinates can be obtained by iterating through the elements of matrix1 and matrix2 and checking for set elements.

  • Answered by AI

Interview Preparation Tips

Round: Test
Experience: Output questions
Tips: focus on basics
Duration: 30 minutes
Total Questions: 15

Round: Test
Experience: Two coding problems in one hour,on Cocobues.com

1. Given two arrays of numbers. The numbers are from 0-9 you have two maximize the first array by using the elements from the second array.
the elements can be used only once.
e.g. arr1[]={5,2,3,6,7};
arr2[]={9,2,8,4,5};
You should output the modified arr1 as {9,8,5,6,7}

2.Given a matrix of characters and a word.
you have to count the number of occurences of that word in that matrix. you can move to any of the eight valid directions from current position.
e.g. word="HELLO";
matrix[][5]={ {'H','E','L','L','O'},
{'E','H','E','A','B'},
{'L','L','O','C','D'}};
output should be : 5

Tips: DO AS MUCH AS PRACTICE
Duration: 60 minutes
Total Questions: 2

Round: Test
Experience: One Coding question was given to all the students ,You have to code and explain it.
You are given an string as input which represents a path. You have to normalize that path inplace(NO EXTRA SPACE).
e.g.
input : "\a\b\c\..\..\file.txt"
output: "\a\file.txt"
Hint: Double dot(..) means you have to skip the previous parent.
It was on paper.
Duration: 40 minutes
Total Questions: 1

Round: Technical Interview
Experience: The interviewer was very nice that was an amazing experience.
Tips: Be confident and relaxed.

Round: HR Interview
Experience: Again the interviewer was very nice. Firstly he asked me what i have done in technical till that time.
After the interview was over he looks impressed.
Tips: Don't see what others are doing . Take your time and try to short out the correct solution.

General Tips: Do coding as much as you can
Skills: Algorithm, Coding Skills And Knowledge On Data Structures
Duration: 2
College Name: NIT Bhopal
Motivation: It comes to our institute, and the name Microsoft is sufficient for motivation.
Funny Moments: The journey to Microsoft IDC Hydrabad was very beautiful.

Skills evaluated in this interview

I applied via Campus Placement

Interview Questionnaire 

2 Questions

  • Q1. Given a string of unknown length, what is a good approach to find n-k th element from last
  • Ans. 

    To find n-k th element from last in a string of unknown length

    • Traverse the string to find its length

    • Calculate the position of n-k th element from last

    • Traverse the string again to find the element at calculated position

  • Answered by AI
  • Q2. Given an array of strings, count the number of unique occurrences
  • Ans. 

    Count the number of unique occurrences in an array of strings.

    • Create a hash table to store the count of each string occurrence.

    • Iterate through the array and update the count in the hash table.

    • Count the number of unique occurrences by counting the number of keys in the hash table.

  • Answered by AI

Interview Preparation Tips

Round: Resume Shortlist
Experience: They checked my CGPA and my projects worked on. They also looked at previous internship I have done
Tips: Focus on CGPA and projects done. Also mention internship experience.

Round: Test
Experience: Easier questions and good amount of time to think.
Tips: Careful with IDE.
Duration: 60min minutes
Total Questions: 2

Round: Group Discussion
Experience: Enough time to think,solve. Questions were easy and only tested basic understanding of ds and algos.
Tips: Think well. They do not expect complete optimal solution. Discuss your ideas with members there

Round: Technical Interview
Tips: They do not expect optimal solution. they want to know thought process

General Tips: Be thorough in course work being done at present.
Revise the projects you have done in your semester
Skills: Data Structures, Algorithms, Probability theory, Basics of Machine Learning
Duration: 2 months
College Name: IIT Madras
Motivation: Microsoft !

Skills evaluated in this interview

Software Engineer Interview Questions & Answers

user image Mayank Bhura

posted on 15 Nov 2015

Interview Questionnaire 

2 Questions

  • Q1. Write the backend server code for a tic tac toe game
  • Ans. 

    Backend server code for a tic tac toe game

    • Create a RESTful API using a framework like Express.js

    • Implement game logic to check for winning conditions

    • Use a database to store game state and user information

    • Handle user authentication and authorization

    • Implement real-time updates using WebSockets

  • Answered by AI
  • Q2. Write a program to store a tree on a file. Also write code to reconstruct the tree from that file. Think of efficient techniques
  • Ans. 

    Program to store and reconstruct a tree from a file with efficient techniques.

    • Use a recursive approach to traverse the tree and write each node to the file

    • Include information about the node's parent and children in the file

    • Use a unique identifier for each node to reconstruct the tree from the file

    • Use a data structure like a hash table to store the nodes and their identifiers for efficient reconstruction

  • Answered by AI

Interview Preparation Tips

Round: Test
Experience: All types of C/C++ Aptitude and I/O questions were asked.
Was not a very easy round.
Tips: Prepare from -----/ and -----/
I had done everything in these 2 links.
Other than that, you can prepare from "Test your C Skills" by Yeshwant Kanetkar. PDF available online.
Duration: 30 minutes
Total Questions: 40-50

Round: Test
Experience: Two coding questions were asked. It was hosted on CoCubes website.
Questions were pretty basic.
First one was ad-hoc, requiring to count the number of set bits of a number.
Second one was the standard, minimum cost path DP problem.
Tips: Prepare from geeksforgeeks, careercup and ambitionbox.
If you know competitive programming, you should not have much of a problem.
Duration: 90 minutes
Total Questions: 2

Round: Test
Experience: Had to write code on paper. 2 questions.
First one was to rotate a matrix by 90 degrees. Pretty standard question.
Second one was to remove all negative elements in an array to the right end. Do it without extra memory.
Tips: Apart from correctness of solution, they check for code quality. Code written must be clean, indented and with properly named variables and functions.
Keep communicating your ideas to the people who will be supervising the test. They will understand your thought process that way.
Duration: 60 minutes
Total Questions: 2

Round: Technical Interview
Experience: Wrote the class in JAVA. Explained the methods, and optimized them. Variables were named properly.
Also generalized the class for an nxn matrix tic-tac-toe game.
Interviewer was very friendly. Wrote the code on paper.
Tips: Prepare on class design beforehand. They are quite likely to ask you questions on OOP.
Write clean code.

Round: Technical Interview
Experience: Just had to write the functions. Wrote code in C++.
The interviewer tested me on edge cases. Asked me to prepare test cases.
Tips: Make sure your code is ready to tackle those dirty edge cases.
Knowing standard library functions is beneficial. Make sure you learn some important ones. They can come in handy.
Write clean code. You can choose any language you are comfortable in.

General Tips: Stay calm. Prepare well.
Focus on the data structures that Microsoft usually asks about.
Skill Tips: A good internship helps in the process. I had interned at Google, so I got selected relatively easily as compared to other candidates. Make sure your resume is as impressive as you can make it.
Stay calm in the rounds. That way you can think better.
Communicate with the company officials. They will know you and your thought process that way.
Don't stay quiet in the interview rounds. If you have doubts, ask them. I had made this mistake when they came for internships and did not get selected because I didn't clear my doubts. The interview should be ideally like a discussion, where you present your thoughts and ideas, clear your doubts, and come up with a solution.
Skills: Resume, Communication, Analytical Skills, Algorithmic Approach To Problem Solving, Coding Skills And Knowledge On Data Structures
College Name: NIT Surathkal
Motivation: It is one of the biggest tech giants in the world. I definitely wanted to be a part of it.
Funny Moments: Since I had only 2 interviews, while others had 5, I came out so early that they thought I was rejected.
They later discovered, they were wrong.

Skills evaluated in this interview

Interview questions from similar companies

I was interviewed before Jun 2021.

Round 1 - Coding Test 

(2 Questions)

Round duration - 180 minutes
Round difficulty - Easy

It was an mcq + coding round. There were aptitude and ouput based question in mcq. And coding questions were easy

  • Q1. 

    Find the Duplicate Number Problem Statement

    Given an integer array 'ARR' of size 'N' containing numbers from 0 to (N - 2). Each number appears at least once, and there is one number that appears twice. Yo...

  • Ans. 

    Find the duplicate number in an array of integers from 0 to (N-2).

    • Iterate through the array and keep track of the frequency of each number using a hashmap.

    • Return the number with a frequency greater than 1 as the duplicate number.

    • Time complexity can be optimized to O(N) using Floyd's Tortoise and Hare algorithm.

  • Answered by AI
  • Q2. 

    Reverse String Operations Problem Statement

    You are provided with a string S and an array of integers A of size M. Your task is to perform M operations on the string as specified by the indices in array A...

  • Ans. 

    Given a string and an array of indices, reverse substrings based on the indices to obtain the final string.

    • Iterate through the array of indices and reverse the substrings accordingly

    • Ensure the range specified by each index is non-empty

    • Return the final string after all operations are completed

  • Answered by AI
Round 2 - Video Call 

Round duration - 60 Minutes
Round difficulty - Easy

It was technical + hr round. there were 2 people as interviewer. They stated from intro and asked some basic puzzles and hr questions. After that they asked about my projects, technologies and some ds algo and dbms questions.

Interview Preparation Tips

Eligibility criterianaAccenture interview preparation:Topics to prepare for the interview - Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic ProgrammingTime required to prepare for the interview - 6 MonthsInterview preparation tips for other job seekers

Tip 1 : Practice aptitude
Tip 2 : Focus on practicing coding
Tip 3 : Learn from mistakes

Application resume tips for other job seekers

Tip 1 : Mention some projects that you have done
Tip 2 : Try to have skills that are required for the role

Final outcome of the interviewSelected

Skills evaluated in this interview

Interview Questionnaire 

6 Questions

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