Online Round (1 hr 30 min): 20 MCQs and 2 coding questions
- Given an expression containing alphanumeric characters and parenthesis, check if “(” and “)” are balanced. Parenthesis Checker
- The preorder and the inorder traversals of a binary tree are given.Convert this to a tree where each node contains the sum of the left and right sub trees in the original tree. The values of leaf nodes are changed to 0. Print the preorder and theinorder traversals of the modified tree. Transform to Sum Tree
Technical Round 1 (around 1 hr)
- 1. The interviewer asked me about my project, mainly the database part.
- Given a rectangular matrix and n moves. If you are at a position (x,y) , you can move to (x+1,y) , (x-1,y), (x,y+1), (x,y-1). What is the probability that after n moves ,you will remain inside the rectangle?
- Sum equals to Sum
Technical Round 2 (around 1 hr)
- The interviewer asked me what data structures I know. Then he asked me the applications of graph.
- Suppose there is a social networking site like Facebook. Every user gets some friend recommendations (i.e. People you may know!). Now, if there is a user A and he has 100 friends and each of his friends has got 5 other friends,A can get these 500 recommendations. But the condition is that he should only get the top 10 recommendations with whom he has the maximum number of mutual friends(If A and B are friends and B and C are friends, then A and C have a mutual friend, B). Suggest an efficient data structure for this and how to implement it. The implementation should be flexible as at any moment, any user can make new friends and he may also unfriend someone!
- Applications of heap. Insertion in a heap ( insertion of strings in a heap, priority is decided lexicographically). Time complexity of insertion.
Thanks GeeksforGeeks 🙂
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.