Microsoft Corporation
10+ Flipkart Interview Questions and Answers
Q1. Given preorder and postorder traversal of a binary tree. Construct a binary tree and return inorder traversal.
Construct binary tree from preorder and postorder traversal and return inorder traversal.
Create a root node with the first element of preorder traversal
Find the index of root node in postorder traversal
Divide the preorder and postorder traversals into left and right subtrees
Recursively construct left and right subtrees
Return inorder traversal of the constructed binary tree
Q2. Given two strings return true if both are anagrams of each other
Check if two strings are anagrams of each other
Create a character frequency map for both strings
Compare the maps to check if they are equal
Q3. Find a free IP range in an infinite pool of reserve IPs
To find a free IP range in an infinite pool of reserve IPs, we can iterate through the pool and check for available ranges.
Iterate through the pool of reserve IPs
Check for consecutive available IPs to form a range
Return the first free IP range found
Q4. Implement trie in vanilla javascript with a UI problem of creating, deleting nested HTML element
Implement trie in vanilla javascript with a UI problem of creating, deleting nested HTML element
Create a Trie class with methods for inserting and searching words
Implement a UI with buttons to create and delete nested HTML elements
Use event listeners to handle user interactions
Update the UI dynamically based on trie operations
Q5. Print the content of a spiral matrix
Print the content of a spiral matrix
Create a 2D array to represent the matrix
Use four variables to keep track of boundaries (top, bottom, left, right)
Iterate through the matrix in a spiral pattern, printing each element as you go
Q6. Explain the tech stack, pros and cons
The tech stack includes Java, Spring Boot, React, and MySQL. Pros include robustness and scalability, cons include potential performance issues.
Tech stack: Java, Spring Boot, React, MySQL
Pros: Robustness, scalability
Cons: Potential performance issues
Q7. LLD for a distributed cache service.
LLD for a distributed cache service involves designing the architecture, data flow, and communication protocols.
Design a scalable architecture with multiple nodes for storing and retrieving data.
Implement data partitioning to distribute data across nodes efficiently.
Define communication protocols for nodes to coordinate and synchronize data.
Include mechanisms for data replication and consistency across nodes.
Consider fault tolerance and recovery strategies in case of node fai...read more
Q8. Design a generic notification system.
Design a generic notification system.
Define different types of notifications (email, SMS, push notifications)
Implement a way to schedule notifications
Allow users to customize notification preferences
Include a logging system to track sent notifications
Consider security measures to protect user data
Q9. Design Memory Management system
Design a memory management system for efficient allocation and deallocation of memory in software applications.
Implement a memory pool to pre-allocate a fixed amount of memory for frequent allocation and deallocation operations.
Use garbage collection to automatically reclaim memory that is no longer in use.
Implement memory segmentation to divide memory into different segments for better organization and management.
Use smart pointers in C++ to automatically manage memory alloc...read more
Q10. Design a parking lot
Design a parking lot with multiple levels and automated ticketing system
Include multiple levels for parking spaces
Implement automated ticketing system for entry and exit
Utilize sensors to detect available parking spots
Incorporate payment options for customers
Provide security measures such as CCTV cameras and alarms
More about working at Microsoft Corporation
Top HR Questions asked in Flipkart
Interview Process at Flipkart
Top Senior Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month