Microsoft Corporation
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
I was interviewed in Nov 2020.
Round duration - 90 minutes
Round difficulty - Medium
This round was conducted in Hackerrank portal for a total duration of 95 minutes and was divided into 4 sections.
1st Section : Aptitude Section : 14 questions , 28 minutes
2nd Section : Technical Section : 12 questions , 17 minutes
3rd Section :1 coding Questions : 20 minutes+30 minutes
You are provided with an array ARR
of positive integers. Each integer represents the number of liters of water in a bucket. The goal is to make the liters of water in ...
Given an array of water buckets, find the minimum liters of water to remove to make all buckets contain the same amount of water.
Iterate through the array to find the most common amount of water in the buckets.
Calculate the total liters of water that need to be removed to equalize all buckets to the most common amount.
Return the total liters of water to be removed.
You need to determine all possible paths for a rat starting at position (0, 0) in a square maze to reach its destination at (N-1, N-1). The maze is represented as an N*N ma...
Find all possible paths for a rat in a maze from source to destination.
Use backtracking to explore all possible paths in the maze.
Keep track of visited cells to avoid revisiting them.
Explore all possible directions (up, down, left, right) from each cell.
Add the current direction to the path and recursively explore further.
If the destination is reached, add the path to the list of valid paths.
Round duration - 120 Minutes
Round difficulty - Medium
This was an Online F2F Technical Round conducted on CodePair : Hackerrank. So, Basically You have to Run and Submit ( Pass All Test cases) in the Interview Round also (Like normal Coding Test) in Codepair : Hackerrank & along with that You should have to explain your Code and Approach to the Interviewers.
The Interviewers were helpful and didn't hesitate in giving hints.
Timing - 10:00 A.M to 12:00 P.M
In this problem, you have a one-dimensional garden of length 'N'. Each position from 0 to 'N' has a fountain that can provide water to the garden up to a certain range...
Find the minimum number of fountains to activate to water the entire garden.
Iterate through the array to find the coverage of each fountain.
Keep track of the farthest coverage reached by activating fountains.
Activate the fountain that covers the farthest point not yet covered.
Repeat until the entire garden is watered.
You are provided with a list of 'transactions' involving 'n' friends who owe each other money. Each entry in the list contains information about a receiver, sender, and the tran...
Minimize cash flow problem among friends by optimizing transactions.
Create a graph where nodes represent friends and edges represent transactions.
Calculate net amount each friend owes or is owed by summing up all transactions.
Use a recursive algorithm to minimize cash flow by settling debts between friends.
Update the graph and repeat the process until all debts are settled.
Round duration - 120 Minutes
Round difficulty - Hard
A lot of Variants based on Constraints were asked in this Round. They will ask you to write the final code for every question before Submitting it(run all test cases) so you won’t get any hints after running test cases in the IDE. ( So don’t Submit your code before dry running it on a lot of Test Cases on pen & paper , they allow to use pen & blank paper at the time of Interviews) .The Interviewers tried to trick in case of time complexities even if you gave the best one. So try to be confident.
Imagine you are Harshad Mehta's friend, and you have been given the stock prices of a particular company for the next 'N' days. You can perform up to two buy-and-sell ...
The task is to determine the maximum profit that can be achieved by performing up to two buy-and-sell transactions on a given set of stock prices.
Iterate through the array of stock prices and keep track of the maximum profit that can be achieved by buying and selling at different points.
Maintain variables to store the maximum profit after the first transaction, the maximum profit after the second transaction, and the m...
Round duration - 30 minutes
Round difficulty - Easy
This was HR Round. The HR was friendly and asked basic questions.
The timing was 2:00 PM to 2:30 PM.
Tip 1 : Make sure that you are thorough with CS concepts beforehand.
Tip 2 : Even when you are explaining the approach to a question, try to parallelly think about how you would code it.
Tip 3 : Read the previous interview experiences. It would give a fair idea of the kind of questions one should expect.
Tip 4 : For position like Microsoft SDE-1, practicing medium difficulty level coding questions would be the way to go.
Tip 5 : Practice atleast 200 questions from coding platforms like CodeZen, LeetCode, Interviewbit as they contain common interview questions.
Tip 1 : Mention Projects and past work experience as it sets good impression.
Tip 2 : Keep your resume up to date for the role you are applying.
Tip 3 : Try to keep your resume of 1 Page.
I was interviewed in Sep 2020.
Round duration - 45 Minutes
Round difficulty - Easy
Had some small chit-chat regarding how Work from Home is going on for him and me. Later he introduced himself and asked the same.
Coming to technical questions, he asked me the algorithm and also asked me to code the questions mentioned below. Discussed the time complexities and edge cases.
You are given a N x M
matrix of integers. Your task is to return the spiral path of the matrix elements.
The first line contains an integer 'T' which denotes the nu...
The task is to return the spiral path of elements in a given matrix.
Iterate over the matrix in a spiral path by keeping track of the boundaries.
Print the elements in the spiral path as you traverse the matrix.
Handle cases where the matrix is not a square matrix separately.
Given an array or list of strings called inputStr
, your task is to return the strings grouped as anagrams. Each group should contain strings that are anagrams of one anoth...
Group anagrams in an array of strings based on character frequency.
Create a hashmap to store sorted strings as keys and corresponding anagrams as values.
Iterate through the input strings, sort each string, and add it to the hashmap.
Return the values of the hashmap as grouped anagrams.
Round duration - 45 Minutes
Round difficulty - Medium
This round started without any introduction, and he directly jumped into the question. Asked me about the algorithm, and later coded it and ran it. And then he asked me to optimize it. Finally, he asked me if I had any questions.
Design a 2-player Tic-Tac-Toe game played on an N
* N
grid where Player 1 uses ‘X’ and Player 2 uses ‘O’. A move is always valid and occupies an empty spot.
If a player places ...
Design a 2-player Tic-Tac-Toe game on an N x N grid where players take turns placing their marks, and the first player to get N marks in a row wins.
Implement a function move(row, col, player) to handle each player's move and check for a win condition.
Keep track of the board state and update it after each move.
Check for winning conditions horizontally, vertically, and diagonally after each move.
Return the result (0 for ...
Tip 1 : Solve as many questions as you can
Tip 2 : Practice Quantitate aptitude.
Tip 3 : Don't lie on your resume.
Tip 1 : Have some good projects.
Tip 2 : Don't lie on your resume.
What people are saying about Microsoft Corporation
I was interviewed before Sep 2020.
Round duration - 90 minutes
Round difficulty - Easy
This round consists of 3 coding questions with a total time limit of 90 minutes. The first two questions were of easy level and the third question was of medium level. No two candidates had the same set of questions, the distribution of questions was random. The test was conducted on mettl platform with both audio and video on for monitoring on the candidate.
Given a stream of integers, calculate and print the median after each new integer is added to the stream.
Output only the integer part of the median.
N = 5
Stre...
Calculate and print the median after each new integer is added to the stream.
Use two heaps - a max heap to store the smaller half of the numbers and a min heap to store the larger half.
Keep the sizes of the two heaps balanced to efficiently calculate the median.
If the total number of elements is odd, the median will be the top element of the max heap.
If the total number of elements is even, the median will be the avera
You are given 'n' fruit trees planted along a road, numbered from 0 to n-1. Each tree bears a fruit type represented by an uppercase English alphabet. A Ninja walking ...
The Ninja must collect fruits from trees in consecutive order, maximizing the number of fruits in two baskets.
Iterate through the trees while keeping track of the types of fruits collected in each basket.
Use a sliding window approach to find the maximum number of fruits collected.
Keep track of the count of each fruit type encountered to handle the condition of only two types of fruits in each basket.
You are given D
dice, each having F
faces numbered from 1 to F
. The task is to determine the number of possible ways to roll all the dice such that the sum of the face-up num...
The task is to determine the number of possible ways to roll all the dice such that the sum of the face-up numbers equals the given 'target' sum.
Use dynamic programming to solve the problem efficiently.
Create a 2D array to store the number of ways to achieve each sum with the given number of dice.
Iterate through the dice and faces to calculate the number of ways to reach each sum.
Return the result modulo 10^9 + 7.
Optim...
Round duration - 50 miutes
Round difficulty - Medium
This was my first interview and I was a bit nervous. The interview was conducted on Microsoft Team. He told me to share my screen and write the pseudo code on notepad. The interviewer was very friendly and also gave me hints for the question. However, he mostly focused on optimization of the code. At the end of the question, few questions related to Operating Systems were asked.
Given an array or list of strings called inputStr
, your task is to return the strings grouped as anagrams. Each group should contain strings that are anagrams of one anoth...
Group anagrams in an array of strings based on character frequency.
Iterate through each string in the input array
For each string, sort the characters and use the sorted string as a key in a hashmap to group anagrams
Return the grouped anagrams as arrays of strings
Round duration - 45 minutes
Round difficulty - Medium
The second round consisted questions related to concepts of object oriented programming and databases. At the end of the interview he asked me to explain any one good project. The interview lasted for 45 minutes. The interviewer was friendly and good.
You are given a sequence of numbers, ARR
. Your task is to return a sorted sequence of ARR
in non-descending order using the Merge Sort algorithm.
The Merge Sort...
Implement Merge Sort algorithm to sort a given sequence of numbers in non-descending order.
Divide the input array into two halves recursively until each array has only one element.
Merge the sorted halves to produce a completely sorted array.
Time complexity of Merge Sort is O(n log n).
Round duration - 30 minutes
Round difficulty - Easy
This was my last round and I was a bit tensed. It was an HR round. The interviewer was very professional. He discussed and asked questions about my various achievements, my interests apart from the technical field and also asked about my projects. I made sure to answer all the questions confidently and calmly.
Tip 1 : Having a grip over Data Structures and Algorithms is very important. Have your concepts crystal clear and then pick one coding platform( for example, leetcode, InterviewBit, CodeZen, GeeksForGeeks) and try to practice around 7-10 questions everyday with varying difficulty and different topics. I completed around 200+ questions on leetcode, 200+ questions on geeks for geeks and around 30-40 problems on InterviewBit.
Tip 2 : After writing code for a particular question try to analyze its time and space complexity. Think about how you can optimize your code further. Also refer to the editorials and compare your solution with it. Interviewers ask a lot about further code optimization. Hence, instead of trying to solve more and more problems, try to analyze a question completely and understand the concept behind them.
Tip 3 : Along with coding, study about OOPS. Coding Ninja's Data Structures and Algorithms course helped a lot in preparing the OOPS concepts specifically. Also, OS and DBMS must also be studied. You can refer to GeekForGeeks articles for these topics.
Tip 4 : Keep participating in coding contests. It helps you increase your speed. I participated in almost every Leetcode Weekly Contest which helped me keeping the track of my improvement.
Tip 1 : Do not fake any skills, projects or achievements. The interviewer gets to know about it by asking questions to you.
Tip 2 : You do need to have a long list of projects. Any 1 good project with proper knowledge of it will also do good. Similarly, you do need to have many skills to be listed down. Few skills but with proper knowledge is great.
Tip 3 : Try to write achievements which proves your technical skills, communication skills, leadership quality or teamwork.
Microsoft Corporation interview questions for designations
I was interviewed before Sep 2020.
Round duration - 90 minutes
Round difficulty - Medium
The online coding round took place at 9:30 am in the morning. The platform was new so I got familiar with it in advance, a night before, to avoid any hassle during the test. There was camera proctoring and laptop screen sharing throughout the test. Multiple programming languages like Java, C, C++ and Python were allowed. There were 3 coding questions based on DSA. Questions were different for different candidates.
You are provided with an array of strings, and your objective is to determine the number of unique strings within it.
A string is deeme...
Given an array of strings, determine the number of unique strings that cannot be transformed into another string by swapping characters at odd or even indices.
Iterate through each string in the array and check if it can be transformed into another string by swapping characters at odd or even indices.
Keep track of unique strings that cannot be transformed and return the count.
Example: For array = ["abcd", "cbad", "bdac"...
Given two strings 'P' and 'Q' of equal length, determine if string 'P' can be transformed into string 'Q' by cyclically rotating it to the right any num...
Check if one string can be transformed into another by cyclically rotating it to the right.
Iterate through all possible rotations of string P and check if any of them match string Q.
Use string concatenation to simulate cyclic rotations efficiently.
Compare the rotated strings with string Q to determine if they are equivalent.
You have been provided with an array where each element specifies the number of buses that can be boarded at each respective bus stop. Buses will only stop at locations that...
Given an array representing number of buses at each bus stop, determine how many buses originate from each stop.
Iterate through the array and for each element, increment the count of buses originating from the corresponding bus stop.
Use an array to store the count of buses originating from each stop.
Remember to consider the constraint of 1-based indexing for bus stops.
Round duration - 45 Minutes
Round difficulty - Medium
The interview took place through Microsoft Teams at 2:00 pm. The platform was smooth and the interviewer was very friendly and told me that he isn't looking for bookish language answers but he only wants to check my understanding of CS subjects.
Given an array of integers representing the heights of mountains, determine the length of the longest subarray that forms a mountain shape.
A mountain subarray...
Find the length of the longest mountain subarray in an array of integers.
Iterate through the array to find peaks.
Expand from peaks to find ascending and descending slopes.
Track the length of the mountain subarray and return the maximum length.
Round duration - 55 Minutes
Round difficulty - Medium
The interview was conducted on Microsoft Teams and the interviewer was very friendly. He made sure I was comfortable and described his role at Microsoft.
Given an array containing N
distinct positive integers and a number K
, determine the Kth largest element in the array.
N = 6, K = 3, array = [2, 1, 5, 6, 3, ...
Find the Kth largest element in an array of distinct positive integers.
Sort the array in non-increasing order and return the Kth element.
Use a sorting algorithm like quicksort or heapsort for efficiency.
Ensure the array contains distinct positive integers for accurate results.
ACID properties in DBMS ensure data integrity and consistency.
Atomicity: All transactions are either fully completed or fully aborted. For example, transferring money from one account to another should be completed in its entirety.
Consistency: The database remains in a consistent state before and after the transaction. For example, if a constraint is violated during a transaction, the transaction will be rolled back.
Is...
Round duration - 60 Minutes
Round difficulty - Hard
The interview was conducted on Microsoft Teams and code was written on Notepad (screen shared). The interviewer was friendly and gave hints to reach the final solution.
Design a data structure that supports four operations: insert an element, remove an element, search for an element, and get a random element. E...
Design a data structure supporting insert, delete, search, and getRandom operations in constant time.
Use a combination of hashmap and array to achieve O(1) time complexity for all operations.
For insert operation, check if element exists in hashmap, if not add to array and hashmap.
For remove operation, check if element exists in hashmap, if yes, remove from array and hashmap.
For search operation, check if element exists...
You are given a Binary Search Tree (BST), and your task is to convert it into a sorted Doubly Linked List (DLL).
Consider the provided BST. The goal is ...
Convert a Binary Search Tree to a sorted Doubly Linked List efficiently.
Implement a function to convert a BST to a sorted DLL.
Use in-order traversal to efficiently convert the BST to DLL.
Maintain pointers for the head and tail of the DLL.
Ensure the left child of a node becomes the previous node and the right child becomes the next node in the DLL.
Tip 1 : The most important topic to prepare is DSA, everything else is secondary. Don't run behind advanced technologies if your DSA concepts are not strong.
Tip 2 : Make sure you know the fundamentals of the programming language you code in, apart from OS, OOP and DBMS concepts. Knowledge of these topics showcase your interest in Computer Science, in general.
Tip 3 : Practice by giving contests on Leetcode and other coding platforms. Don't focus on your score or rank, just focus on your learning.
Tip 1 : Make sure your resume is well structured and only 1 page, if you are a fresher. It should include relevant sections like Work Experience (Any past internships), PORs (Any college society you were a part of), Personal Projects and Achievements that you wish to showcase.
Tip 2 : Proofread your resume multiple times. Get it reviewed by your seniors or your friends to ensure there are no grammatical mistakes or spelling errors as it gives a bad impression.
Get interview-ready with Top Microsoft Corporation Interview Questions
I was interviewed before Sep 2020.
Round duration - 45 minutes
Round difficulty - Easy
It was in the late afternoon. I was vey nervous, but the interviewer was very friendly. I managed to solve the questions early, so we discussed general things about the company and its culture.
Given some information about rooms in a military camp, where rooms are numbered from 0 to 'N-1'. Each room may contain keys to some other rooms. You can only visit a room ...
Determine if all rooms can be visited starting from room 0 with given keys information.
Use depth-first search (DFS) to traverse through rooms and keys.
Keep track of visited rooms to avoid infinite loops.
Check if all rooms have been visited at the end.
You are provided with a singly linked list that may contain a cycle. Your task is to return the node where the cycle begins, if such a cycle exist...
To detect the first node of the loop in a singly linked list, we can use Floyd's Cycle Detection Algorithm.
Use Floyd's Cycle Detection Algorithm to find the meeting point of the slow and fast pointers in the linked list.
Reset one of the pointers to the head of the linked list and move both pointers at the same speed until they meet at the start of the cycle.
The node where the pointers meet is the first node of the loop
Round duration - 30 minutes
Round difficulty - Medium
The duration of the round was 30 minutes. It was conducted in the morning hours. The interviewer asked me many questions regarding my internship experience and my project. Later we discussed some problem solving.
Round duration - 75 minutes
Round difficulty - Hard
This round was conducted early in the morning. The interviewer was highly experienced and very friendly. He discussed about his life journey and his experience with the company.
Overall the experience was good, getting interviewed by such experienced person
You are given a binary tree consisting of 'N' unique nodes and a start node where the burning will commence. The task is to calculate the time in minutes required to completely b...
Calculate the time in minutes required to completely burn a binary tree starting from a given node.
Traverse the tree to find the longest path from the start node to a leaf node.
The time to burn the entire tree is equal to the length of the longest path.
Simulate the burning process by incrementing the time for each level of the tree.
Tip 1 : Regularly practice atleast 10 questions on various topics
Tip 2 : Participate in coding competitions to experience time bound coding
Tip 3 : Give mock interviews for better results
Tip 1 : Mention the projects clearly, explaining the tech stack, the problem solved and whether its a group or individual project
Tip 2 : Do not put false things on resume.
Tip 3 : Mention only those skills, in which you are confident.
I was interviewed before Sep 2020.
Round duration - 1 hour
Round difficulty - Medium
You are provided with an integer array ARR
of length 'N'. Your objective is to determine the first missing positive integer using linear time and constant space. T...
Find the smallest positive integer missing from an array of integers.
Iterate through the array and mark positive integers as visited by changing the sign of the corresponding index.
After marking all positive integers, iterate again to find the first positive integer with a positive value.
Return the index of the first positive integer found plus one as the answer.
Tip 1 : During an interview, never say that you don't know the answer, keep trying and the interviewer will help you himself.
Tip 2 : Keep speaking up the approach going on in your mind, they want to judge your approaches much more than whether the answer is right or wrong.
Tip 3 : Be confident, cheerful, keep smiling, and continue making eye contact with the interviewer, this leaves a positive impression.
Tip 4 : Search and practice questions specific to the company, questions are repeated several times.
Tip 5 : A sound knowledge of Microsoft Azure Services and cloud computing will be an icing on the cake, and increase your chances to get selected.
Tip 6 : Keep giving contests on coding platforms, it will help you to stay motivated and check your stand.
Tip 7 : Keep a daily goal of number of questions instead of the time duration.
Tip 1 : Everything mentioned on the resume should be thoroughly known to you since if they catch you being dishonest, pretty good coding skills also might not help.
Tip 2 : Have projects related to the same field you are trying to apply for mentioned in your resume, this shows you are already experienced in the field.
Tip 3 : Adding references of some experienced people of the same field might help you gain their trust.
Tip 4 : Do not keep your resume too long, and do not mention irrelevant details, keep it short and crisp.
Tip 5 : Some experience in the field of operations and management or some positions of responsibility will really help you score extra points since it shows you have leadership qualities and are familiar with the market along with super coding skills.
I would like to develop a mobile application that helps people track their daily water intake.
The app would allow users to set daily water intake goals and track their progress throughout the day.
It could also provide reminders to drink water and offer tips for staying hydrated.
The app could integrate with wearable devices to automatically track water intake.
Users could also log the type of water they are drinking, suc...
I was interviewed before Sep 2020.
Round duration - 75 minutes
Round difficulty - Easy
This was the coding round which consisted of three coding questions and the time limit was of 75 minutes. The platform used was Co-Cubes. 3 questions were asked of 2, 3 and 5 marks respectively with varying difficulty.
Given an integer N
, find the nearest multiple of 10. If there are multiple nearest multiples, return the smallest one.
The first line contains an integer ...
Given an integer, find the nearest multiple of 10. If multiple nearest multiples, return the smallest one.
Iterate through each test case
Calculate the remainder when dividing N by 10
If remainder is less than or equal to 5, nearest multiple is N - remainder
If remainder is greater than 5, nearest multiple is N + (10 - remainder)
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.
The first line consists of an integer 'T',...
Create a function to determine the day of the week for any given date.
Parse the input integers to create a date object
Use a library or algorithm to calculate the day of the week for the given date
Return the corresponding day of the week as a string
Given a singly linked list and two integers 'N' and 'M', traverse the linked list to retain 'M' nodes and then delete the next 'N' nodes. Continue this proces...
Traverse a linked list to retain 'M' nodes and then delete the next 'N' nodes, repeating until the end of the list.
Create a function that takes the head of the linked list, 'N', and 'M' as input parameters.
Traverse the linked list, retaining 'M' nodes and deleting the next 'N' nodes in each iteration.
Continue this process until the end of the linked list is reached.
Update the next pointers accordingly to skip 'N' nodes...
Round duration - 30 minutes
Round difficulty - Easy
This was a written round and we were expected to write fully functional code, without any bugs and errors. Library functions used if any, had to be explained and if possible, code for that too (not that rigorous). Pseudocode and algorithms were also allowed. All the assumptions made had to be explained as well.
The Look-And-Say sequence is a series of positive integers generated in a specific pattern:
1, 11, 21, 1211, 111221, 312211, 13112221,...
To construct this sequen...
The Look-And-Say sequence is a series of positive integers generated in a specific pattern based on the count of digits in the previous number.
Implement a function to generate the Nth term of the Look-And-Say sequence efficiently.
Use a loop to iterate through the sequence generation process.
Keep track of the count of consecutive digits in each number to generate the next number.
Handle the constraints of the number of t...
Given an array ARR
consisting of non-negative integers, rearrange the numbers to form the largest possible number. The digits within each number cannot be changed.
Rearrange the array elements to form the largest possible number by concatenating them.
Sort the array elements in a custom way to form the largest number.
Convert integers to strings for comparison while sorting.
Handle edge cases like leading zeros in the final number.
Example: For input [12, 5, 34], the output should be '53412'.
Round duration - 50 minutes
Round difficulty - Easy
The interviewer was very friendly and started asking me questions by making me comfortable.
You are provided with a directory path in Unix-style notation, and your task is to simplify it according to given rules.
In a Unix-style file system:
The task is to simplify a directory path in Unix-style notation according to given rules.
Use a stack to keep track of directories while iterating through the input path.
Handle cases for '.', '..', and multiple slashes to simplify the path.
Return the simplified path starting with a slash and without a trailing slash.
You are provided with two arrays representing the coefficients and degrees of a polynomial expression. Your task is to simplify this polynomial into its general...
Simplify a polynomial expression by combining like terms and arranging them in descending order of degrees.
Iterate through the coefficients and degrees arrays to combine like terms
Create a map to store coefficients based on degrees
Sort the map keys in descending order to get the simplified polynomial
Round duration - 40 minutes
Round difficulty - Easy
This round was focused on resume and projects
Round duration - 30 minutes
Round difficulty - Easy
This round was basically a mix of HR and creative design round. The interviewer wanted to check whether the candidate can think out-of-the-box with regard to any given problem and come up with unique, optimized solutions.
Tip 1 : I would suggest practicing as many questions on data structures and algorithms as you can because it is the question practice that would help you in building your concepts strong. I practiced a lot of questions on InterviewBit and completed all modules of data structures and algorithms because there you can find the recent interview questions that you should know.
Tip 2 : If you have time for your interviews, I would recommend going through Leetcode as it has a good variety of questions sorted on topic wise difficulty level where you can try to solve at least 20-30 questions for each data structure and algorithm. Moreover, you should regularly participate in the weekly contests happening there so that you could know about your weak areas to improve.
Tip 3 : Along with coding you should be clear about some basic concepts of Operating systems and Databases that would help in your interviews. One more thing is that do some good research about the company's goal and vision and be prepared to ask some company-related queries that show your interest in the company.
Tip 1 : Your Resume should consist of mainly skills, projects, and achievements. Projects would play a crucial part in your interview and you should have at least one most relevant and good project that shows how strong your concepts are in development.
Tip 2 : The most important tip is that never lie on your resume and like If you have worked upon some technology for the project part only and don't know the proper depth you could write basics only in your resume.
I was interviewed before Sep 2020.
Round duration - 90 minutes
Round difficulty - Easy
This round was the online coding test conducted on the platform Mettl. The languages allowed were C, C++, Java and Python. There were three questions. One was of graphs (Depth-first search), other was a big integer problem and the third was a string problem.
You are provided with a graph consisting of N
vertices, numbered from 1 to N
, and M
edges. Your task is to color the graph using two colors, Blue and Red, such that no two...
Given a graph with vertices and edges, determine if it can be colored using two colors without adjacent vertices sharing the same color.
Check if the graph is bipartite using graph coloring algorithm like BFS or DFS.
If the graph is bipartite, return 'Possible' with a valid coloring assignment.
If the graph is not bipartite, return 'Impossible'.
Write a program to perform basic string compression. For each character that repeats consecutively more than once, replace the consecutive duplicate occurrences with t...
Write a program to compress a string by replacing consecutive duplicate characters with the character followed by the number of repetitions.
Iterate through the string and count consecutive occurrences of each character
Append the character and its count to a new string
Return the compressed string if it is shorter than the original, else return the original string
Handle edge cases like single characters or when compresse
Round duration - 60 minutes
Round difficulty - Easy
This was a pen and paper subjective interview round. You were expected to write full code on paper. Make sure you use proper names for the variables and write comments explaining very clearly what the code does. Also, try writing code in good handwriting which can be understood by the interviewer.
Count total palindromic substrings in a given string.
Iterate through each character in the string and consider it as the center of a palindrome. Expand outwards to find all palindromic substrings.
Use dynamic programming to efficiently check if a substring is a palindrome.
Consider both odd-length and even-length palindromes.
Example: Input 'ababa', output 7 (a, b, a, b, a, aba, aba)
Round duration - 45 minutes
Round difficulty - Easy
The interview took place in the morning and the interviewer was very friendly.
Let A[0 ... n-1]
be an array of n
distinct positive integers. An inversion of A
is a pair of indices (i, j)
such that i < j
and A[i] > A[j]
. Given an integer array...
Count the number of inversions in an array of distinct positive integers.
Use merge sort algorithm to count inversions efficiently.
Divide the array into two halves and recursively count inversions in each half.
Merge the two sorted halves while counting split inversions.
Time complexity can be optimized to O(n log n) using merge sort.
Example: For input A = [2, 4, 1, 3, 5], the output should be 3.
Transform a given binary tree into a sum tree where each node is replaced by the sum of its immediate children's values. Leaf nodes should be replaced with 0. Then, p...
Convert a binary tree into a sum tree by replacing each node with the sum of its children's values, and return the preorder traversal.
Traverse the tree recursively and replace each node with the sum of its children's values
Leaf nodes should be replaced with 0
Perform a preorder traversal on the transformed sum tree to get the final result
Round duration - 30 minutes
Round difficulty - Easy
The HR Interview round was held in the morning and it was right after my technical interview.
Just be confident during interview and if you are stuck in between any question, then ask for a hint from the interviewer. The practice is key for success, so practice hard for Data Structures and Algorithms coding problems on Coding ninjas as it is the best platform for coding. Also you may practice on Geeks For Geeks or any other interview portal.
Application resume tips for other job seekersMention all internships which you have done, as it increases your chances of shortlisting your resume. Also just write that skills which you are pretty confident about.
Final outcome of the interviewSelectedSome of the top questions asked at the Microsoft Corporation Software Developer interview -
The duration of Microsoft Corporation Software Developer interview process can vary, but typically it takes about less than 2 weeks to complete.
based on 29 interviews
4 Interview rounds
based on 78 reviews
Rating in categories
Software Engineer
2k
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 |
Consultant
599
salaries
| ₹0 L/yr - ₹0 L/yr |
Support Engineer
552
salaries
| ₹0 L/yr - ₹0 L/yr |
Amazon
Deloitte
TCS