Microsoft Corporation
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
A class is a blueprint or template for creating objects, while an object is an instance of a class.
A class defines the properties and behaviors that an object will have.
An object is created from a class and can have its own unique values for the properties defined in the class.
Multiple objects can be created from a single class.
Classes can be used to create objects with similar characteristics and behaviors.
Objects can...
The most efficient algorithm to sort a linked list is Merge Sort.
Merge Sort is a divide-and-conquer algorithm that recursively divides the linked list into smaller sublists.
It then merges the sorted sublists to obtain the final sorted list.
Merge Sort has a time complexity of O(n log n), making it efficient for large linked lists.
It depends on the specific use case and requirements.
Stored procedures are precompiled and can be executed independently.
Triggers are automatically executed when a specific event occurs.
Stored procedures are suitable for complex business logic and data manipulation.
Triggers are useful for enforcing data integrity and maintaining consistency.
Both triggers and stored procedures have their own advantages and should be use
A binary search tree is valid if the left subtree is less than the root and the right subtree is greater than the root.
Check if the left subtree is less than the root and the right subtree is greater than the root
Traverse the tree recursively and check each node
Use a min and max value to check if each node is within the correct range
Example: 5 / \ 2 7 / \ / \ 1 3 6 8 is a valid binary search tree
Example: 5 / \ 2 7 / \
Print binary tree in zig-zag order
Use two stacks to keep track of nodes at each level
Alternate between popping nodes from the stacks to print in zig-zag order
Start with the root node and push its children onto the first stack
Continue until both stacks are empty
A thread is a subset of a process, sharing memory and resources. Word and PowerPoint are different processes.
A process is a standalone program with its own memory space, while a thread is a subset of a process sharing memory and resources.
Processes are independent of each other, while threads within the same process can communicate directly.
Word and PowerPoint are different processes as they are separate applications r
Spell checker routine in Word and PowerPoint helps identify and correct spelling errors in documents and presentations.
The spell checker routine scans the text for misspelled words.
It suggests corrections for misspelled words based on a built-in dictionary.
Users can choose to accept or ignore the suggested corrections.
The spell checker can be customized to add new words to the dictionary or ignore certain words.
In Powe...
Test cases to test basic features of a mobile
Test making a call
Test sending a text message
Test browsing the internet
Test taking a photo
Test playing a video
Test installing and uninstalling an app
Test adjusting volume and screen brightness
Test connecting to Wi-Fi and Bluetooth
Test charging the phone
Test accessing and using the phone's settings
Implementing the 'tail' command in C to display the last few lines of a file.
Open the file using fopen()
Seek to the end of the file using fseek()
Read the file backwards line by line using fseek() and fgets()
Store the lines in an array of strings
Print the lines in reverse order
What people are saying about Microsoft Corporation
Reverse a linked list by changing the direction of pointers.
Create three pointers: prev, curr, and next
Initialize prev to null, curr to head
Loop through the list and set next to curr's next node
Set curr's next node to prev
Move prev and curr one step forward
Return prev as the new head
Yes, we can find if there is a loop in a linked list using the Floyd's cycle-finding algorithm.
Use two pointers, one moving at a speed of one node at a time and the other moving at a speed of two nodes at a time.
If there is a loop, the two pointers will eventually meet at the same node.
If the fast pointer reaches the end of the list (i.e., null), there is no loop in the linked list.
Using a hashmap to store frequency of numbers in both arrays can help determine if they have the same set of integers.
Create two hashmaps to store frequency of numbers in each array
Iterate through both arrays and update the frequency in the hashmaps
Compare the hashmaps to check if they have the same set of integers
Catch and finally blocks in Java exception handling are essential for proper error handling and resource cleanup.
Catch block is used to handle exceptions that occur within the try block.
Finally block is used to execute code that must run regardless of whether an exception is thrown or not.
Using both catch and finally blocks ensures proper error handling and resource cleanup in Java programs.
To detect the starting point of a loop in a linked list, we can use Floyd's Cycle Detection Algorithm.
Use Floyd's Cycle Detection Algorithm to find the meeting point of slow and fast pointers in the loop.
Move one pointer back to the head of the linked list and then move both pointers at the same pace until they meet again. The meeting point will be the start of the loop.
Alternatively, use a hash set to store visited no...
Microsoft Corporation interview questions for popular designations
Code for subtitle syncing application
Create a function to parse subtitle file and extract time stamps
Create a function to parse video file and extract time stamps
Calculate time difference between subtitle and video time stamps
Adjust subtitle time stamps accordingly
Output synced subtitle file
Design ADT for chess game classes
Create classes for pieces (king, queen, etc.), board, player, game
Use inheritance to represent different types of pieces
Implement methods for moving pieces, checking for checkmate, etc.
Microsoft is a leader in technology innovation and provides a challenging and rewarding work environment.
Microsoft is a well-established and respected company in the tech industry
The company is known for its cutting-edge technology and innovation
Working at Microsoft offers opportunities for growth and development
The company culture values diversity and inclusion
Microsoft has a strong commitment to social responsibility
Yes, I left Barclays to join Microsoft.
I was looking for new challenges and opportunities to grow my skills.
Microsoft offered a more dynamic and innovative work environment.
I was excited about the potential to work on cutting-edge technology and make a real impact.
I had always admired Microsoft's commitment to innovation and customer satisfaction.
I believe in continuous learning and improvement, and strive to bring innovative solutions to the table.
I am always looking for ways to improve my skills and knowledge
I am proactive in identifying and solving problems
I am a team player and collaborate effectively with my colleagues
I am committed to delivering high-quality work and meeting deadlines
I am adaptable and able to work in a fast-paced environment
AI logic for Chess representation
Implement minimax algorithm with alpha-beta pruning
Use evaluation function to assign values to board positions
Implement move ordering to improve efficiency
Use transposition tables to store previously evaluated positions
Implement iterative deepening to improve search depth
Get interview-ready with Top Microsoft Corporation Interview Questions
To find least common ancestor of two nodes in a binary tree, traverse the tree from root to the nodes and store the paths. Then compare the paths to find the common ancestor.
Traverse the binary tree from root to the two nodes and store the paths
Compare the paths to find the common ancestor
If the binary tree is a BST, compare the values of the nodes to find the common ancestor
If one of the nodes is the ancestor of the o
Optimizing for binary search tree
Ensure the tree is balanced to maintain O(log n) search time
Implement efficient insertion and deletion algorithms
Use in-order traversal for sorted output
Consider using AVL or Red-Black trees for self-balancing
Avoid using recursion for large trees to prevent stack overflow
Search for a string in a 2D character matrix in any direction
Iterate through each cell of the matrix
For each cell, check all possible directions for the string
If found, return the starting and ending coordinates of the string
To identify swapped nodes in a binary search tree, we need to perform an inorder traversal and compare adjacent nodes.
Perform an inorder traversal of the binary search tree
Compare each node with its adjacent node
If a node is smaller than its previous node, mark it as a swapped node
If two nodes are swapped, swap their values to restore the original binary search tree
Print first 200 Fibonacci numbers in reverse order.
Use an array to store the Fibonacci numbers
Start with 0 and 1, then add the previous two numbers to get the next one
Loop through the array in reverse order to print the numbers
Check if a string is a palindrome or not.
A palindrome is a word, phrase, number, or other sequence of characters that reads the same forward and backward.
To check if a string is a palindrome, compare the first and last characters, then the second and second-to-last characters, and so on.
If all pairs match, the string is a palindrome. If any pair does not match, the string is not a palindrome.
Ignore spaces, punctuation,...
Normalization is the process of organizing data in a database to reduce redundancy and dependency.
2NF eliminates partial dependencies by ensuring that non-key attributes depend on the entire primary key.
3NF eliminates transitive dependencies by ensuring that non-key attributes depend only on the primary key.
BCNF eliminates overlapping candidate keys by ensuring that each determinant is a candidate key.
Indexes are used to improve database performance by allowing faster data retrieval. Clustered indexes determine the physical order of data, while non-clustered indexes are separate structures.
Indexes are used to speed up data retrieval in databases
Clustered indexes determine the physical order of data in a table
Non-clustered indexes are separate structures that point to the data in a table
A table can have only one clus...
Designed a relational database with tables for users, products, orders, and payments.
Identified entities and relationships to create tables
Normalized tables to reduce redundancy and improve data integrity
Used primary and foreign keys to establish relationships between tables
Implemented indexes to improve query performance
I misunderstood the requirements and implemented the wrong feature.
Misunderstood the requirements
Implemented the wrong feature
Realized the mistake after the first round
My aggregate is lower due to personal circumstances and challenges I faced during my studies.
I faced personal challenges during my studies that affected my grades
I had to balance work and school which impacted my performance
I have learned from my experiences and have taken steps to improve my skills
I am confident in my abilities to succeed in this role
I have a passion for software development and want to pursue it as a career.
I have always been interested in technology and programming
I enjoy the challenge of solving complex problems through coding
I want to make a difference in the world through software development
I believe that my skills and interests are better suited for a career in software development
I respect my father's business but it is not my passion
I use my technical skills to develop software solutions that streamline business processes and improve efficiency.
Identify pain points in the business and develop software solutions to address them
Automate repetitive tasks to save time and reduce errors
Develop custom software to meet specific business needs
Integrate different software systems to improve data flow and communication
Provide technical support and training ...
Teaching is not my passion, but software development is.
I enjoy problem-solving and creating solutions through coding
I have a strong interest in technology and its advancements
Teaching requires a different set of skills and patience that I may not possess
I believe I can make a greater impact in the software development industry
Microsoft is a leader in technology innovation and provides a great platform for personal and professional growth.
Microsoft has a strong reputation for innovation and cutting-edge technology
The company offers a wide range of opportunities for personal and professional growth
Microsoft has a diverse and inclusive culture that values collaboration and teamwork
The company is committed to making a positive impact on the wor
I played a key role in developing and implementing the project using Java and Spring framework.
Developed and maintained RESTful APIs using Java and Spring framework
Collaborated with the team to design and implement new features
Used Git for version control and JIRA for project management
Conducted code reviews and wrote unit tests to ensure code quality
Deployed the application on AWS using Elastic Beanstalk
Provided techn...
I have focused on building real-world applications and contributing to open-source projects.
I believe in learning by doing and building practical applications.
I have contributed to open-source projects like XYZ and ABC.
I have participated in hackathons and coding challenges organized by my university and local tech communities.
I prioritize building a strong foundation in software development principles and practices.
I ...
I have gained practical experience through personal projects and freelance work.
I have been working on personal projects related to software development for the past few years.
I have also taken up freelance work and have worked on various projects for clients.
I believe that these experiences have given me a good understanding of the industry and the skills required to succeed.
I am confident that I can apply these skill...
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
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 ...
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
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
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
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
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
| ₹16 L/yr - ₹50 L/yr |
Senior Software Engineer
1.1k
salaries
| ₹25 L/yr - ₹96 L/yr |
Software Engineer2
1k
salaries
| ₹20 L/yr - ₹72 L/yr |
Software Developer
762
salaries
| ₹14 L/yr - ₹50.4 L/yr |
Consultant
600
salaries
| ₹13 L/yr - ₹36.7 L/yr |
Amazon
Deloitte
TCS