Open In App
Related Articles

Oyo Rooms Interview Experience | Set 9

Improve Article
Save Article
Like Article

Round 1 : This was online coding  round consisting of 2 coding questions each of 100 marks  and 15 objective questions each of 2 marks.If you have basic knowledge of C, Java, Operating System, DBMS  you can score easily.

Coding question 1 – Given an array A. Three integers a, b and d. You can add or subtract a or b any number of times to d. You need to check how many elements can be formed  by applying these operations to d and those elements should be in range 0 to 10^9.
Solution:  So consider the equation ax + by = c. For an integer solution to (x, y) c should be divisible by gcd(a, b)
So answer= multiples of gcd in given range for ex if a=2 and b=4 and d=5. gcd(2, 4)=2 so elements that can be formed are 1(5-4), 3(5-2) 5, 7, 9, 11, 13, 15 ….

Coding question 2 – Given a matrix. Empty cells are represented by ‘.’, cells which are occupied are represented by ‘B’. Given two cells ‘S’ and ‘D’, find the minimum distance required from S to D.

initialize dis[m][n] as infinite.

This is a simple BFS question.  This question is not a dp question as we can move in all 4 directions .You can use bfs and each time update corresponding distance in tht cell i, j if i, j is a valid move and dis[i][j]>curr dist then dis[i][j] =curr and curr++;

For objective questions go through geeksforgeeks CS Subjects Section.

Only 2 students were able to solve both coding questions. I was one of those :p .But still 6 students were shortlisted for interview round.

Round 2: This round lasted about 50 minutes. The interviewer asked me some basic DS questions( 2-3 ques from interview bit  ) after asking about my projects and internship.
1.Given a set of time intervals in any order, merge all overlapping intervals into one and output the result which should have only mutually exclusive intervals
Refer –

2. Implement LRU Cache. He asked me to implement it in my project.

3. Find the distance between two keys in a binary tree, no parent pointers are given.
Refer –

4 Given a binary tree, print boundary nodes of the binary tree Anti-Clockwise starting from the root


5 Given three stack of the positive numbers, the task is to find the possible equal maximum sum of the stacks with removal of top elements allowed.

last que (easiest one ) sutta kaha milta hai tumhare campus mein :p

I answered all ques 🙂 and last one with full confidence :p

Round 3:.

  1. Basic paging segment and OS scheduling questions
  2. Code for Dining philosopher problem
  3.  print all views of a binary tree ?
    I soved in 2 traversal . Then he asked me to solve in 1 . Finally i did
    Refer- for left view
    Refer for right view –
    but u have to print all views (bottom top right left ) all in traversal.Use bfs traversal and for each level the leftmost one will be left view at that level and rightmost one will be the right one
    and for top and bottom use (hosrizontal dis technique) for each dis the first node will be top view and the last node for tht dis will be bottom view
    use hashing to do store all view separately in 1 traversal
  4. Given a number x, find sum of digits in all numbers from 1 to n.
    Refer –

2 students  were selected after 2 rounds. Other had round 3 also .

Final Tip : when its your day to get selected . no one can stop u . Go for it just go through geeksforgeeks that would be enough.

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!

Last Updated : 08 Aug, 2021
Like Article
Save Article
Similar Reads