# OYO Rooms Interview Experience | Freshers | SDE | On Campus

Round 1: (Online Test)

Oyo Rooms visited ourÂ campus in Jan 2019. The first round was anÂ online test conducted on hackerearth.Â  There were 2 sections. The 1st section contained 25 MCQs based on OS, DBMS, Data Structures, Aptitude. The second section contained 2 coding questions:

1. You are given a list of n-1 integers and these integers are in the range of 1 to n. There are no duplicates in list. One of the integers is missing in the list. Write an efficient code to find the missing integer.Â  Â  Â  Â  Â Solution: Â Link
2. In share trading, a buyer buys shares and sells on a future date. Given the stock price of n days, the trader is allowed to make at most k transactions, where a new transaction can only start after the previous transaction is complete, find out the maximum profit that a share trader could have made.Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â Solution: Â Link

Round 2: (F2F Round)

1. Given a linked list where in addition to the next pointer, each node has a child pointer, which may or may not point to a separate list.Â  Â  These child lists may have one or more children of their own, and so on, to produce a multilevel data structure, as shown in the below figure. You are given the head of the first level of the list. Flatten the list so that all the nodes appear in a single-level linked list. You need to flatten the list in a way that all nodes at first level should come first, then nodes of the second level, and so on.Â  Â  Â  Â  Solution:Â Link
2. Given sum of digitsÂ aÂ and sum of square of digitsÂ b. Find the smallest number with given sum of digits and sum of the square of digits. The number should not contain more than 100 digits. Print -1 if no such number exists or if the number of digits is more than 100.Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Solution: Link
3. Given an array of integers, the task is to find the maximum absolute difference between the nearest left and the right smaller element of every element in the array.Note:Â If there is no smaller element on the right side or left side of any element then we take zero as the smaller element. For example for the leftmost element, the nearest smaller element on the left side is considered as 0. Similarly, for rightmost elements, the smaller element on the right side is considered as 0. Solution: Link

Round 3: (F2F Round)

1. Given arrival and departure times of all trains that reach a railway station, find the minimum number of platforms required for the railway station so that no train waits. We are given two arrays which represent arrival and departure times of trains that stop.Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â Solution:Â Link
2. ImplementationÂ of the dictionary data structure.
3. Implementation of the trie tree data structure.
4. Implementation of theÂ hashmap data structure.
5. Difference between Mutex and Semaphores.

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!

Previous
Next