Microsoft Interview Experience | Set 169 (SDE 2 for 3.5 years experience)
1st round(online coding):
- Given an array that contains both positive and negative integers, find the product of the maximum product subarray.
- Sort an almost sorted array where only two elements are swapped.
- Given an integer value and a pointer to the head of the linked list, delete all the nodes from the list that are greater than the specified value.
2nd Round(DSA) :
- Find median of BST. BST can have duplicates as well. Had to write production level code using recursion and backtracking both. I told him various approaches. However, he was looking for the median in one scan only using two pointers.
- Introduction and detailed project discussion.
- Find the majority element in an array. The majority element is the element that occurs more than half of the size of the array. We discussed various approaches and finally had to write working code for one of them.
- Left View of a Binary Tree. Working code was required and some questions from the code. Like, why you used static variable and how will you do it without using any static and global variables.
- Some questions from pointer, like,
Structure of linked list is :
So, what will happen if you remove * from node *next.
And some more deep questions from pointers.
- Design a real-time URL spam filtering service. We have information about billions of URLs whether they are spam or no. We need to come up with an architecture solution to store all the URLs and retrieve the information in minimum latency. There were some constraints, like, you have been given a very small memory. So, you can load only a few URLs in memory for the query.
- Implement your own malloc and free for application x, which should control the heap memory usage of the application x. Discussed various approaches for assigning memory for a request.
- Project discussion and some behavioral questions.
- Any offer in hand?
6th Round(Hiring manager):
- Detailed discussion of recent project.
- Some behavioural questions.
- Given preorder traversal of a binary search tree, construct the BST. Full working code was required.
- Given events, like, switch on, switch off, pull chair. Design an architecture to count the number of events in given time frame. Time frame can be minutes, hour or day.
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses
are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!