There were 3 questions in the online round .2 questions related to simple array manupulation and one bst.
Those who did atleast 2 questions were selected for other rounds.
It was group fly round where in we were given 2 questions.
1st : There is an array which is sorted but rotated at one end. you have to find the given element in that array.
Expected time complexity : logn.
I gave the solution using binary search.
2nd question :
Check given tree is BST .
Technical round :
He asked me about my project which i have done till now.I just explained him about my python web scrapping project.Then he went for questions.
1st : you are given a bst, you have to print the sum of all nodes whose value is greater than or equal to the present node.(this has to be done for every node present in the bst)
He asked me to write the code on paper.
my approach : First calculate the total sum of nodes in the bst using inorder recursive function.
Again traverse the tree in inorder, maintain a sum_prev which is adding node values.Print sum-prev_sum. prev_sum+=node_value
void sum(Node* root)
void solution(Node* )
he asked me to try it in one loop.I gave it in one loop using : https://www.geeksforgeeks.org/add-greater-values-every-node-given-bst/
2nd question based on kadane’s algorithm.https://www.geeksforgeeks.org/largest-sum-contiguous-subarray/
1st question minimum length of maximum sum array.
I gave this solution using kadane’s algorithm with maintaining prev_minimum_length as a variable
2nd question : right view of binary tree
i gave my solution using level order (queue)
She asked me to write the code on paper.
She asked me about my projects.
Senior SDE Engineer took my interview.
He first asked about me and some random stuffs, hobies and all.
then he asked me one question :
Given n points in a globe/2 dimensional infinite matrix . Find the closest point to a given point.
o(n2) solution not expected.
I approached it by making some tiles for every point . Then i told him that we can first search it in near 8 sqaures /tiles near that given point.Then he took out some mistake and asked me to think more as i m going in the right direction.
Then I told him that i ll sort the points according to x variable and then y and then restrict my search for the closest point in the region bounded by that points .
he told me not to code as i have coded in all the rounds.
My all interviews went quite well and results came after 15 days and I was selected.
Just focus on interview specific questions, Operating systems, DBMS, and data structures .
Before going for interviews Read some interview experiences .
Thanks you geeksforgeeks for such a good platform to prepare for interviews.
- Philips Intern Interview Experience 2019
- Microsoft Interview Experience | Set 51 (For SDE Intern)
- Microsoft Interview Experience - On campus SDE Intern
- Microsoft Interview experience | Set 73 (On-Campus for IT SDE Intern)
- Microsoft Interview Experience (SDE Intern-2020-On Campus )
- Samsung R&D Banglore On-Campus Intern July-2019
- Google Software Engineering Intern, Fall 2019 - North America
- Microsoft Intern Selection Process (On-Campus)
- Microsoft FTE Interview Experience 2019 | On Campus
- Microsoft Interview Experience 2019 (Internship)
- Microsoft Interview Experience (For Summer 2019 Internship)
- Microsoft Interview Experience 2019 | Off-Campus Internship For IDC
- Microsoft Interview Experience for Consultancy Job 2019(On-campus)
- Microsoft Interview Experience 2019 (TECH - SET GO ) | Off-Campus Internship
- Microsoft Interview Experience 2019 | Off-Campus Software Engineering Internship
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.