OYO Rooms Interview Experience for SDE-I | On-Campus 2020
OYO visited our campus in the month of November for the SDE-I profile. A total of 1651 students applied.
Round 1 (Online Test): The online test was on the HackerEarth platform which consisted of 10 MCQs based on OS, DBMS, and Data Structures followed by 2 programming questions.
- Smart points collection – https://leetcode.com/problems/delete-and-earn/
- Unique path Finding – Find the number of ways to return to the same vertex of a triangle after exactly n steps. Moving from one vertex to an adjacent vertex is considered as 1 step. (print your result modulo 109+7).
Consider a triangle ABC, starting vertex is A Input: n = 1 Output: 0 No possible way Input: n = 2 Output: 2 There are 2 possible ways: (ABA, ACA) Input: n = 3 Output: 2 There are 2 possible ways: (ABCA, ACBA)
Around 64 students were shortlisted for the next round.
Round 2 (Technical Interview): This round was based on your knowledge in Data Structures and algorithms where I was asked 3 coding questions. The interview started with my introduction followed by these questions:
- K reverse Linked List – I was asked to write a function for it. First, I described the approach and later wrote a function describing a recursive solution.
- Time is taken to completely hydrate a binary tree – Starting from the root node of a binary tree, the time is taken to hydrate that node would be equal to the value of that node. As soon as it hydrates, the water will start pouring to its two child nodes. Time taken by them to hydrate would be equal to the values of those nodes, and it goes on the same way for all other nodes. Find how much time it would take to completely hydrate all the nodes of the tree.
- Implement a max heap and how deletion takes place in a heap.
The interviewer was very friendly and helpful and gave me hints wherever I got stuck.
Lastly, I was asked a question on socket.io because I mentioned one of my project based on socket programming.
You should discuss the approach along with the coding with the interviewer. They focus on your thought process and your approach towards the problem.
Round 3 (Technical Interview): This round was also based on your knowledge of DSA. I was asked 2 coding questions.
- Given the mxn matrix and a number x. All the rows and columns in a matrix are sorted in increasing order. Find the number x in the matrix – https://www.geeksforgeeks.org/search-in-row-wise-and-column-wise-sorted-matrix/. First I gave the brute force approach. The interviewer told me to optimize it. Later I optimized to O(m + n) and the interviewer was quite happy with my solution.
- I was asked to design a data structure where Insert, Delete, Find and FindRandom number takes constant time complexity. I gave a HashMap solution – https://www.geeksforgeeks.org/design-a-data-structure-that-supports-insert-delete-search-and-getrandom-in-constant-time/
Round 4 (Technical Interview): This round also focused on DSA concepts. I was asked 2 coding questions.
- Given a basket of n eggs. A person can either take 1 or 2 eggs at a time. Count the number of ways the person can remove all the eggs from the basket. I described the approach and later was told to code my approach. This problem was similar to The Staircase Problem.
- Given a BST and (min, max) range. Delete the node values if the value is not in the given range and maintain the condition of BST. I was told to describe the approach to the problem. https://www.geeksforgeeks.org/remove-bst-keys-outside-the-given-range/
This was the final round and the interview ended with a good note. There was no HR round. Each interview lasted for almost an hour.
Finally, the results were declared and a total of 11 students were selected, including me.
Tip: Be confident and focus more on solving DSA problems as they test your programming skills and problem-solving skills.
I hope my experience helps. All the Best!!