-
Notifications
You must be signed in to change notification settings - Fork 13
Interview Experience 123
"First round: Online round
3 questions were asked and 75 minutes were given
- Find the average of the ASCII characters in a string
- Find the day of the week, given any date( assuming 1/1/1900 was a Monday)
- Given a linked list, delete n nodes after retaining m nodes https://www.geeksforgeeks.org/delete-n-nodes-after-m-nodes-of-a-linked-list/
Total 49 students were selected
Second Round: Group Fly
One question was given and we had to write fully functioning code in 30 mins:
Q. Given a BST, print all root to leaf paths having sum K
Keep in mind, the construction of the tree was important as well. Try to talk and clarify your doubts as much as you can.
Total 25 students were selected after this round.
Third Round: Technical Interview
Q. Write a code to print the 2nd largest element of an array
A. I gave a naive approach of finding the max and the second max as well. The interviewer asked me a solution better than O(n)
I gave this approach based on a min-heap https://www.geeksforgeeks.org/kth-smallestlargest-element-unsorted-array/
He then asked me to write the code, and explain the logic.
He asked me to derive the complexity for the heapify function and explain all the recursive calls.
He then gave me a puzzle to solve.
Q. Given a board of mxn dimensions, we can traverse only along the edges of the board, we have to find the total number of ways to go from the top left to the bottom right, if we can move only downwards and rightwards along the edges.
We then had a brief discussion on my project under a professor at my college and then he was done.
Fourth Round: Technical Interview
The Interview started with the interviewer asking me to design a coding competition website.
I gave a 2-module based design, one for the online judge and one for the web server. I had to explain how the API calls to the judge would look like. He then asked me to list some functional and non-functional requirements. He gave a situation when I would have 1000000 questions on the site and the user wants to see them, then my DB query would be hung for 5 minutes. I suggested using pages in my API to give only the first 100 questions and the link to the next 101-200 and so on. The interviewer seemed impressed with that.
Then he asked a question.
Q. Given a BST, modify it, such that the node contains the sum of values of all nodes greater than it (Example: Rightmost node will have value 0)
A. Reverse Inorder Traversal
He then asked me some basic OOPS concepts like Abstraction, Encapsulation and Polymorphism. He asked me to give a real life example of Polymorphism.
Fifth Round: Technical Interview
The Interviewer asked me to design a website with the features of:
-
Twitter trending feed with #NIT Durgapur
-
Question answer based forum (He asked to write schema for my RDBMS)
-
Suggested questions and answers when the user keys in some words
-
Approach is based on NLP.
He then asked me how will I handle the synchronous requests from my website, and how I will make it scalable, considering my user base crosses 1 billion.
He asked me some cloud-related questions, what is Load balancer, etc.
Then he gave a question to rotate a matrix by 90 degree without extra space.
https://www.geeksforgeeks.org/inplace-rotate-square-matrix-by-90-degrees/
He started asking me about my projects (Like a URL Shortener, he asked me to write the hashing function as well as the collision avoidance mechanism)
He then went to ask about NOSQL, specifically MongoDB
The interview ended after that and I was selected shortly."