Microsoft Corporation
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
I appeared for an interview before Sep 2020.
Round duration - 45 minutes
Round difficulty - Medium
It was an online round hosted on cocubes. It consisted of 3 coding questions only and the duration of the test was 45 mins.
The test link with a unique id and password was sent to the email 1 day prior to the test day. It consisted to platform specification, sample test etc.
On the day of test, we were given a time slot of 5pm - 11pm. We could attempt the test as per our comfort.
The instructions were pretty straightforward and we could attempt it from anywhere.
There were only 2 requirements. A webcam must be available. And a decent internet.
About the Platform.
In all of the problems base classes and code were disabled, we needed to implement only certain classes/ functions. Clipboard copy was blocked, tab switching was not allowed and rest the platform is very basic and simple.
Given two singly linked lists, each representing a positive number without leading zeros, your task is to add these two numbers. The result should be returned a...
Add two numbers represented by linked lists and return the sum as a linked list.
Traverse both linked lists simultaneously while keeping track of carry.
Create a new linked list to store the sum.
Handle cases where one linked list is longer than the other.
Update the next pointer of the current node to point to the new node with the sum.
Handle the carry if it exists after reaching the end of both linked lists.
Given an array 'ARR' of integers with length 'N', the task is to determine the sum of the subarray (including an empty subarray) that yields the maximum sum among al...
Find the maximum sum of a subarray in an array of integers.
Iterate through the array and keep track of the maximum sum subarray ending at each index.
Use Kadane's algorithm to efficiently find the maximum subarray sum.
Consider the case where all elements are negative, in which case the maximum sum would be the largest negative number.
Given a binary tree of integers, your task is to calculate the sum of all the leaf nodes which are present at the deepest level of the binary tree. If ...
Calculate the sum of leaf nodes at the deepest level of a binary tree.
Traverse the binary tree to find the deepest level.
Keep track of leaf nodes at the deepest level and calculate their sum.
Handle null nodes represented by -1.
Ensure the sum fits in a 32-bit integer.
Round duration - 60 minutes
Round difficulty - Hard
This round is known as the group fly round. After clearing the first round, we were called at the Microsoft Gurgaon office for the face to face interviews. Approximately, 60 students were there on the day I was called. I guess there were multiple days for multiple slots.
We all were divided into groups of 6-8 people and were called inside a round table room with 1 interviewer. This round consisted of 1 problem only to be discussed over with the interviewer. And the solutions to be written on pen paper.
The key here is to walk through the thought process and the steps with the interviewer. He will go around the table and will have discussion with each one of us and discuss about the pros, cons of the solutions.
It is advisable to ask as many questions as possible, to gather requirements and to be sure what are the expectations.
Round duration - 60 minutes
Round difficulty - Medium
This was the first face to face round.
It was held just after the group fly. From my group fly slot, 2/7 were selected.
The interviewer made me comfortable, we started informal talks about college and hobbies.
It kicked off with some basic discussion of the previous round problems, he had some questions about the encryption and security related stuff from payment scenario.
Then there were some behavioral questions and lastly there were a couple of whitepaper coding questions.
Given an integer N
, your task is to position N
queens on an N x N
chessboard in such a way that no two queens threaten each other.
A queen can attack other queens that are in t...
Position N queens on an N x N chessboard so that no two queens threaten each other.
Use backtracking to explore all possible configurations.
Keep track of rows, columns, and diagonals to ensure no two queens threaten each other.
Display all valid configurations found.
Given a binary tree, your task is to print the left view of the tree.
The input will be in level order form, with node values separated by a...
Print the left view of a binary tree given in level order form.
Traverse the tree level by level and print the first node of each level (leftmost node).
Use a queue to keep track of nodes at each level.
Time complexity should be O(n) where n is the number of nodes in the tree.
Round duration - 45 minutes
Round difficulty - Easy
This was the second face to face. Almost 50% students were selected from the first face to face round.
This was very straightforward round, a hectic day and it was already late by now.
The interviewer started with formal introduction and gave me 2 very basic problems to code.
This code consists of writing the entire code from scratch on whitepaper, with unit tests that can cover almost all scenarios. Some sample test cases were given by the interviewer at the end, to validate and dry run my solution.
Determine if a given Singly Linked List of integers forms a cycle or not.
A cycle occurs when a node's next
points back to a previous node in the list. This...
Detect if a singly linked list forms a cycle by checking if a node's next pointer points back to a previous node.
Traverse the linked list using two pointers, one moving one step at a time and the other moving two steps at a time.
If the two pointers meet at any point, there is a cycle in the linked list.
If one of the pointers reaches the end of the list (null), there is no cycle.
You are provided with a non-empty binary tree where each node has a non-negative integer value. Compute and return the maximum possib...
Find the maximum path sum between two leaves in a binary tree.
Traverse the binary tree to find the maximum path sum between two leaves.
Keep track of the maximum sum encountered during traversal.
Consider all possible paths that include leaf nodes.
Handle cases where there is only one leaf node or no leaf nodes.
Implement a recursive function to calculate the maximum path sum.
Round duration - 30 minutes
Round difficulty - Easy
This was the final round.
It was very late in the evening, around 10pm.
The interviewer here was one of the senior manager in the org (M2).
This kicked off with very informal conversations and introductions.
The interviewer was very engaging.
Tip 1 : Be solid with the basics of Ds, Algo. Good to have end to end projects which are hosted on cloud.
Tip 2 : Its always good to be presentable and have good communications skills
Tip 3 : Be honest, clear in approach and always walkthrough your thought process to the interviewer
Tip 1 : Mention your projects and experience at the top. Be clear on what was done, a brief on how it was done, language /tech stack involved. If possible try to host and make it accessible. You never know if you can present it with just one click.
Tip 2 : Choose a balance between, white spaces and text, it should be well indented, no grammatical errors.
Tip 3 : It takes less than 2 min to scan a resume. Don't mention things which are irrelevant.
posted on 21 Feb 2020
I applied via Company Website and was interviewed before Feb 2019. There were 5 interview rounds.
I appeared for an interview before Sep 2020.
Round duration - 90 minutes
Round difficulty - Hard
Online coding contest, focus on DP and trees
In Ninjaland, a chess tournament is being organized with C
chess players attending. They will all stay in a hotel that has N
available rooms. Each player will choose one...
Assign rooms to chess players to maximize overall focus level by minimizing distance between rooms.
Sort the positions of rooms in ascending order.
Calculate the distances between adjacent rooms.
Select rooms with minimum distances to maximize overall focus level.
Round duration - 45 minutes
Round difficulty - Hard
It was conducted on the GHCI conference itself. It was held in a Microsoft interview room at the career fair of the conference. This was primarily based on my coding abilities and understanding how to optimise a solution
Given a string S
and a list wordList
containing N
distinct words, determine if each word in wordList
is present in S
. Return a boolean array where the value at index 'i' indi...
Given a string and a list of words, check if each word in the list is present in the string and return a boolean array.
Iterate through each word in the wordList and check if it is present in the string S.
Use a boolean array to store the presence of each word in the string.
Remember that the presence of a word is case sensitive.
Do not use built-in string-matching methods.
Return the boolean array without printing it.
Round duration - 30 minutes
Round difficulty - Medium
This was a system design round.
Round duration - 20 minutes
Round difficulty - Easy
This was the HR round and only typical HR questions were asked.
Tip 1 : Practice implementation of code end to end
Tip 2 : CV should have many projects and published paper to be shortlisted
Tip 3 : Focus on optimization
Tip 1 : Include projects in your resume.
Tip 2 : Keep resume of one page, but utilize the entire page efficiently
What people are saying about Microsoft Corporation
Given a 2D array of alphabets and a function to check valid English words, find all possible valid words adjacent to each other.
Create a recursive function to traverse the 2D array and check for valid words
Use memoization to avoid redundant checks
Consider edge cases such as words with repeating letters
Optimize the algorithm for time and space complexity
Insert a node at its correct position in a circular linked list containing sorted elements.
Traverse the linked list until the correct position is found
Handle the case where the value to be inserted is smaller than the smallest element or larger than the largest element
Update the pointers of the neighboring nodes to insert the new node
Consider the case where the linked list has only one node
Microsoft Corporation interview questions for popular designations
Get interview-ready with Top Microsoft Corporation Interview Questions
Answering two questions: about my projects and demonstrating Binary search
For my projects, I have managed various software development projects from initiation to closure
I have experience in Agile and Waterfall methodologies, stakeholder management, risk management, and budgeting
For Binary search, it is a search algorithm that works by repeatedly dividing the search interval in half
It requires a sorted array and compar...
Binary search is a search algorithm that finds the position of a target value within a sorted array.
Start by comparing the target value with the middle element of the array.
If the target value matches the middle element, return its position.
If the target value is less than the middle element, search the left half of the array.
If the target value is greater than the middle element, search the right half of the array.
Rep...
The complexity of what?
Please provide more context or specify what you are referring to
Complexity can refer to various aspects such as technical, organizational, or project-related
It can also be measured using different methods such as time, cost, or scope
Function to find the no. of times a sorted array has been rotated.
Find the index of the minimum element in the array using binary search.
The number of times the array has been rotated is equal to the index of the minimum element.
Handle the case where the array is not rotated (minimum element at index 0).
Implementing a program with logarithmic complexity
Use binary search instead of linear search
Divide and conquer approach can be used
Tree-based data structures can be used
Examples: Binary search, Merge sort, Quick sort
Code for Binary Search
Binary search is a divide and conquer algorithm
It works by repeatedly dividing the search interval in half
If the value is found, return the index
If the value is not found, return -1
Test cases for function and binary search
Test function with different input values and expected output
Test binary search with sorted array and non-existent element
Test binary search with unsorted array and existing element
Test binary search with empty array
Test binary search with array containing only one element
I want to be a PM because I enjoy leading teams and driving projects to success.
I have a passion for organization and planning
I thrive in a fast-paced environment
I enjoy collaborating with cross-functional teams
I have a track record of delivering projects on time and within budget
I am motivated by seeing the impact of my work on the business
For example, in my previous role as a project lead, I successfully managed a te...
I would like to work on developing innovative products that can make a positive impact on people's lives.
I am passionate about creating technology that can improve people's daily lives
I am interested in exploring new ideas and pushing the boundaries of what is possible
I would like to work on projects that have a clear purpose and can make a difference in the world
For example, I would be excited to work on developing ne...
Design navigation system for a net browser with data structures.
Use a stack data structure to implement the back button functionality
Use a queue data structure to implement the forward button functionality
Maintain a history of visited pages using a hash table
Update the history on every page visit
Disable the back button if there is no previous page in the history
Disable the forward button if there is no next page in the
Designing a remote of 5 keys
Identify the purpose of the remote
Determine the most frequently used functions
Consider the ergonomics and ease of use
Include clear labeling and intuitive design
Test and iterate for user feedback
API for a button
Define the button's properties such as size, color, and label
Create a function to handle the button click event
Return the button element with the defined properties and click function
Given a Y-linked list, find the node at the intersection point.
Traverse both branches of the Y-linked list and compare nodes.
Use a hash table to store visited nodes and check for intersection.
If one branch is longer, traverse it until it matches the length of the other branch.
Count the occurrences of each character in a given string including special characters.
Create test cases for empty string
Test for string with only one character
Test for string with all characters being the same
Test for string with all characters being different
Test for string with special characters
Remove duplicate characters from a string while preserving order.
Create an empty string to hold the result.
Iterate through each character in the input string.
If the character is not already in the result string, add it.
Return the result string.
The complexity of the codes depends on the number of operations and loops used.
The first code has a complexity of O(n) as it uses a single loop to iterate through the array.
The second code has a complexity of O(n^2) as it uses nested loops to compare each element with every other element in the array.
The complexity of a code can also depend on the type of operations used, such as sorting or searching.
Complexity can be ...
I have a strong academic background with a focus on computer science and engineering.
Graduated with a Bachelor's degree in Computer Science from XYZ University
Completed a Master's degree in Electrical Engineering from ABC University
Took courses in data structures, algorithms, programming languages, and computer networks
Participated in various coding competitions and hackathons
Maintained a GPA of 3.8 throughout my acade
I am working on this project out of interest and I believe I can improve it by implementing more advanced algorithms and incorporating user feedback.
Implement more advanced algorithms to improve accuracy
Incorporate user feedback to enhance user experience
Optimize code for faster performance
Add more features to increase functionality
My peers would describe me as a reliable and hardworking team player with excellent communication skills.
Reliable and consistent in meeting deadlines and completing tasks
Collaborative and supportive of team members
Clear and effective communicator, both verbally and in writing
Open to feedback and willing to learn and improve
Positive attitude and strong work ethic
I am currently working on a web application for a client in the e-commerce industry.
The project involves developing a user-friendly interface for customers to browse and purchase products.
I chose this project because I have experience in web development and I find the e-commerce industry interesting.
I am also excited about the challenge of creating a seamless checkout process for customers.
The project requires collabor...
I am constantly seeking feedback and learning new skills to improve my performance.
Regularly seeking feedback from colleagues and supervisors
Attending workshops and training sessions to learn new skills
Setting personal goals and tracking progress towards them
Reflecting on past experiences and identifying areas for improvement
Reading industry publications and staying up-to-date with trends
The desire to learn and grow keeps me motivated.
Setting achievable goals
Celebrating small wins
Surrounding myself with positive people
Taking breaks and practicing self-care
Remembering my purpose and passion
Continuously learning and seeking new challenges
My professors would describe me as hardworking and detail-oriented. They have pointed out my weakness in public speaking.
Professors would describe me as hardworking and detail-oriented
Weakness in public speaking has been pointed out
Received positive feedback on assignments and projects
Collaborates well with classmates and participates in group discussions
Short term goal is to learn and contribute to the company. Long term goal is to grow professionally and take on leadership roles.
Short term goal: Learn new skills and technologies
Short term goal: Contribute to the company's success
Long term goal: Grow professionally and take on leadership roles
Long term goal: Build a strong network in the industry
Long term goal: Achieve financial stability
I applied via Campus Placement
To test if every left child's value is less than the right child's value in a binary tree.
Traverse the binary tree using any traversal algorithm (e.g., in-order, pre-order, post-order)
Compare the value of each left child with its right child
If any left child's value is greater than or equal to its right child's value, return false
If all left child's values are less than their right child's values, return true
Cloning a linked list-like structure
Create a new node for each node in the original linked list
Set the value of the new node to the value of the corresponding node in the original linked list
Set the next pointer of the new node to the new node corresponding to the next node in the original linked list
Repeat the above steps until all nodes in the original linked list are cloned
To find the nth character in a stream of bytes, we need to read the stream byte by byte until we reach the nth position.
Start reading the stream byte by byte until you reach the nth position
Return the byte at the nth position
If the stream ends before reaching the nth position, return null or throw an exception
Rearrange a string to avoid consecutive same characters.
Iterate through the string and keep track of the previous character.
If the current character is the same as the previous, swap it with the next different character.
Repeat until no consecutive same characters are left.
The task is to find the next highest palindrome number given a number.
Convert the given number to a string
Check if the number is already a palindrome
If not, increment the number by 1 and check if it is a palindrome
Repeat the previous step until a palindrome is found
Canonicalizing a directory path involves simplifying and standardizing the path to remove any redundant or unnecessary elements.
Remove any consecutive slashes and replace them with a single slash
Remove any trailing slashes
Resolve any relative paths (e.g., '..' and '.')
Handle special cases like the root directory ('/')
Normalize the path by removing any unnecessary elements
I applied via Campus Placement
I applied via Campus Placement
Implement atoi() function to convert a string to an integer.
Remove leading whitespaces
Handle positive and negative signs
Handle overflow and underflow cases
Return 0 if the input string is invalid
To delete a node from a singly linked list without the head node, copy the data from the next node to the current node and delete the next node.
Copy data from next node to current node
Update current node's next pointer to skip the next node
Delete the next node
The largest profit that can be made from buying and selling a stock once given 30 days price info.
Iterate through the price info and keep track of the minimum price seen so far
Calculate the difference between the current price and the minimum price
Update the maximum profit if the difference is greater than the current maximum profit
Return the maximum profit
Modify a 2n element array with n odd and n even numbers so that even indices have odd numbers and odd indices have even numbers.
Iterate through the array and swap odd numbers with even numbers at even indices.
Iterate through the array and swap even numbers with odd numbers at odd indices.
Some of the top questions asked at the Microsoft Corporation interview -
The duration of Microsoft Corporation interview process can vary, but typically it takes about less than 2 weeks to complete.
based on 375 interviews
Interview experience
based on 1.7k reviews
Rating in categories
Software Engineer
1.6k
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Software Engineer
1.1k
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Engineer2
1k
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Developer
762
salaries
| ₹0 L/yr - ₹0 L/yr |
Consultant
600
salaries
| ₹0 L/yr - ₹0 L/yr |
Amazon
Deloitte
TCS