Add office photos
Oyo Rooms logo
Engaged Employer

Oyo Rooms

Verified
3.3
based on 3.5k Reviews
Video summary
Filter interviews by
Designation
Fresher
Experienced
Skills
Clear (1)

30+ Oyo Rooms Interview Questions and Answers for Freshers

Updated 5 Feb 2024
Popular Designations

Q1. Minimum Cost to Destination

You are given an NxM matrix consisting of '0's and '1's. A '1' signifies that the cell is accessible, whereas a '0' indicates that the cell is blocked. Your task is to compute the mi...read more

Ans.

Find the minimum cost to reach a destination in a matrix with blocked cells.

  • Use Breadth First Search (BFS) algorithm to explore all possible paths from the starting point to the destination.

  • Keep track of the cost incurred at each cell and update it as you move through the matrix.

  • Return the minimum cost to reach the destination or -1 if it is unreachable.

Add your answer
right arrow

Q2. Zig-Zag String Problem Statement

Given a string 'STR' of length 'N' and an integer 'M' representing the number of rows in the zig-zag pattern, your task is to return the string formed by concatenating all 'M' r...read more

Ans.

Given a string and number of rows, return the concatenated string formed by arranging the input string in a zig-zag pattern over the specified number of rows.

  • Iterate through the string and distribute characters in zig-zag pattern over 'M' rows

  • Keep track of the direction of movement (up or down) while distributing characters

  • Concatenate characters row-wise to get the final zig-zag pattern string

Add your answer
right arrow

Q3. Count Ways to Complete Journey in Triangular Pyramid

Given a triangular pyramid with vertices marked as ‘O’, ‘X’, ‘Y’, and ‘Z’, and an integer 'N', you need to calculate the number of ways Bob can start at ‘O’,...read more

Ans.

Calculate the number of ways to complete a journey in a triangular pyramid starting and ending at a specific vertex after taking a certain number of steps.

  • Use dynamic programming to calculate the number of ways to return to the starting vertex after 'N' steps.

  • Consider the possible movements from each vertex to adjacent vertices.

  • Keep track of the number of ways to reach each vertex after each step.

  • Return the total number of ways modulo 1000000007.

  • Example: For 'N' = 2, valid se...read more

Add your answer
right arrow

Q4. Maximum Profit Problem Statement

Mukesh is evaluating the maximum profit from his business over a series of days. Given a list of profits over 'N' days, Mukesh wants to determine the highest profit achievable o...read more

Ans.

The task is to find the maximum profit achievable over any consecutive days within a specified range {‘A’, ‘B’}.

  • Iterate through the profit array and calculate the cumulative sum for each possible consecutive days within the range {‘A’, ‘B’}.

  • Keep track of the maximum profit obtained during the iteration.

  • Return the maximum profit as the final result.

Add your answer
right arrow
Discover Oyo Rooms interview dos and don'ts from real experiences

Q5. Boundary Traversal of a Binary Tree

Given a binary tree of integers, your task is to return the boundary nodes of the tree in Anti-Clockwise direction starting from the root node.

Input:

The first line contains...read more
Ans.

Return the boundary nodes of a binary tree in Anti-Clockwise direction starting from the root node.

  • Traverse the left boundary nodes in a top-down manner

  • Traverse the leaf nodes from left to right

  • Traverse the right boundary nodes in a bottom-up manner

  • Handle cases where duplicates occur in the boundary nodes

  • Implement the function without printing as printing is already managed

Add your answer
right arrow

Q6. Maximum Sum of Non-Adjacent Elements

You are given an array/list of integers. The task is to return the maximum sum of a subsequence such that no two elements in the subsequence are adjacent in the given array/...read more

Ans.

Find the maximum sum of non-adjacent elements in an array.

  • Use dynamic programming to keep track of the maximum sum at each index, considering whether to include the current element or not.

  • At each index, the maximum sum can be either the sum excluding the current element or the sum including the current element but excluding the previous element.

  • Iterate through the array and update the maximum sum accordingly.

  • Example: For [3, 2, 7], the maximum sum would be 7 (3 + 7) as 3 and ...read more

Add your answer
right arrow
Are these interview questions helpful?

Q7. Count Pairs with Given Sum

Given an integer array/list arr and an integer 'Sum', determine the total number of unique pairs in the array whose elements sum up to the given 'Sum'.

Input:

The first line contains ...read more
Ans.

Count the total number of unique pairs in an array whose elements sum up to a given value.

  • Use a hashmap to store the frequency of each element in the array.

  • Iterate through the array and for each element, check if (Sum - current element) exists in the hashmap.

  • Increment the count of pairs if the complement exists in the hashmap.

Add your answer
right arrow

Q8. Ways To Make Coin Change

Given an infinite supply of coins of varying denominations, determine the total number of ways to make change for a specified value using these coins. If it's not possible to make the c...read more

Ans.

The task is to find the total number of ways to make change for a specified value using given denominations.

  • Use dynamic programming to solve this problem efficiently.

  • Create a 2D array to store the number of ways to make change for each value using different denominations.

  • Iterate through the denominations and update the array accordingly.

  • The final answer will be stored in the last cell of the array.

  • Consider edge cases like when the value to make change for is 0.

Add your answer
right arrow
Share interview questions and help millions of jobseekers 🌟
man with laptop

Q9. Sum Tree Conversion

Convert a given binary tree into its sum tree. In a sum tree, every node's value is replaced with the sum of its immediate children's values. Leaf nodes are set to 0. Finally, return the pre...read more

Ans.

Convert a binary tree into a sum tree by replacing each node's value with the sum of its children's values. Return preorder traversal.

  • Traverse the tree in a bottom-up manner, starting from the leaf nodes.

  • For each node, update its value to the sum of its children's values.

  • Set leaf nodes to 0.

  • Return the preorder traversal of the modified tree.

Add your answer
right arrow

Q10. Triangle Formation Using Array Elements

Given an integer array/list ARR of length 'N', determine if it is possible to form at least one non-degenerate triangle using the values of the array as the sides of the ...read more

Ans.

Determine if it is possible to form a non-degenerate triangle using array elements as sides.

  • Check if the sum of any two sides is greater than the third side for all combinations of sides.

  • If the above condition is met for any combination, return true; otherwise, return false.

Add your answer
right arrow

Q11. Running Median Problem

Given a stream of integers, calculate and print the median after each new integer is added to the stream.

Output only the integer part of the median.

Example:

Input:
N = 5 
Stream = [2, 3,...read more
Ans.

Calculate and print the median after each new integer is added to the stream.

  • Use a min heap to store the larger half of the numbers and a max heap to store the smaller half

  • Keep the sizes of the two heaps balanced to efficiently calculate the median

  • If the total number of elements is odd, the median will be the top element of the max heap

  • If the total number of elements is even, the median will be the average of the top elements of both heaps

Add your answer
right arrow

Q12. Candies Distribution Problem Statement

Prateek is a kindergarten teacher with a mission to distribute candies to students based on their performance. Each student must get at least one candy, and if two student...read more

Ans.

The task is to distribute candies to students based on their performance while minimizing the total candies distributed.

  • Iterate through the array of student ratings to determine the minimum number of candies required.

  • Assign each student at least one candy.

  • Adjust the number of candies based on the ratings of adjacent students to minimize the total candies distributed.

  • Example: For ratings [5, 8, 1, 5, 9, 4], the optimal distribution would be [1, 2, 1, 2, 3, 1] with a total of 1...read more

Add your answer
right arrow

Q13. What is computer, tel me the full form of computer?

Ans.

A computer is an electronic device that can perform various tasks by executing a set of instructions.

  • Computer stands for 'Common Operating Machine Particularly Used for Technical and Educational Research'.

  • It is a programmable machine that can store, retrieve, and process data.

  • Computers can perform complex calculations, store large amounts of information, and communicate with other computers.

  • Examples of computers include desktops, laptops, tablets, and smartphones.

View 4 more answers
right arrow

Q14. Boolean Matrix Transformation Challenge

Given a 2-dimensional boolean matrix mat of size N x M, your task is to modify the matrix such that if any element is 1, set its entire row and column to 1. Specifically,...read more

Ans.

Modify a boolean matrix such that if any element is 1, set its entire row and column to 1 in-place.

  • Iterate through the matrix to find elements with value 1.

  • Use additional arrays to keep track of rows and columns to be modified.

  • Update the matrix in-place based on the identified rows and columns.

Add your answer
right arrow

Q15. First Unique Character in a Stream Problem Statement

Given a string A consisting of lowercase English letters, determine the first non-repeating character at each point in the stream of characters.

Example:

Inp...read more
Ans.

Given a string of lowercase English letters, find the first non-repeating character at each point in the stream.

  • Iterate through the characters in the string and maintain a count of each character.

  • Use a queue to keep track of the order of characters encountered.

  • For each character, check if it is the first non-repeating character by looking at its count in the map.

  • If a character's count is 1, it is the first non-repeating character at that point in the stream.

  • Return the first n...read more

Add your answer
right arrow

Q16. Cycle Detection in a Directed Graph

Given a directed graph, you need to determine whether or not the graph contains a cycle.

Your function should return true if there is at least one cycle in the graph; otherwi...read more

Ans.

Detect cycles in a directed graph and return true if a cycle exists, false otherwise.

  • Use Depth First Search (DFS) to detect cycles in the graph.

  • Maintain a visited array to keep track of visited vertices and a recursion stack to keep track of vertices in the current DFS traversal.

  • If a vertex is visited and is present in the recursion stack, then a cycle exists.

  • Example: For the input graph with vertices 0, 1, 2 and edges 0->1, 1->2, 2->0, a cycle exists among the vertices 0 -> ...read more

Add your answer
right arrow

Q17. Next Permutation Problem Statement

Given a permutation of ‘N’ integers, rearrange them to generate the lexicographically next greater permutation. A sequence is a permutation if it contains all integers from 1 ...read more

Ans.

The problem involves rearranging a permutation of integers to generate the lexicographically next greater permutation.

  • Understand the concept of lexicographically next greater permutation.

  • Implement a function to find the next greater permutation.

  • Handle cases where no greater permutation exists by returning the smallest permutation.

Add your answer
right arrow

Q18. Validate BST Problem Statement

Given a binary tree with N nodes, determine whether the tree is a Binary Search Tree (BST). If it is a BST, return true; otherwise, return false.

A binary search tree (BST) is a b...read more

Ans.

Validate if a binary tree is a Binary Search Tree (BST) or not.

  • Check if the left subtree of a node contains only nodes with data less than the node's data.

  • Check if the right subtree of a node contains only nodes with data greater than the node's data.

  • Recursively check if both the left and right subtrees are also binary search trees.

Add your answer
right arrow

Q19. Maximum Sum of Index-Multiplied Rotations

Given an array ARR of size N, determine the maximum sum of i * ARR[i] possible through any number of rotations. Both left and right rotations are allowed, and can be pe...read more

Ans.

Find maximum sum of i * ARR[i] possible through any number of rotations in an array.

  • Calculate the sum of i * ARR[i] for each rotation and find the maximum sum.

  • Consider both left and right rotations.

  • Optimize the solution to avoid redundant calculations.

  • Handle edge cases like empty array or single element array.

Add your answer
right arrow

Q20. Averages of Levels in Binary Tree Problem Statement

Given an arbitrary binary tree consisting of 'N' nodes numbered from 1 to 'N'. Each node is associated with a positive integer value. Your task is to calculat...read more

Ans.

Calculate the average of node values at each level in a binary tree.

  • Traverse the binary tree level by level using BFS

  • Calculate the sum of node values at each level and divide by the number of nodes at that level

  • Print the floor value of the average for each level

Add your answer
right arrow

Q21. Problem Statement: Minimum Cost to Buy Ninja Blades

Ninja Yuki wants to purchase ninja blades at the Spring Fair in his village. Initially, he has 0 blades, and his goal is to buy 'N' blades. The merchant offer...read more

Ans.

Calculate the minimum cost to acquire a specific number of ninja blades using a given pricing mechanism.

  • Iterate through each test case to determine the minimum cost needed to acquire the desired number of blades.

  • Consider the cost of adding 1 blade versus doubling the current number of blades to reach the target quantity.

  • Keep track of the total cost as blades are acquired based on the pricing mechanism.

  • Return the minimum cost for each test case.

Add your answer
right arrow

Q22. Rat in a Maze Problem Statement

You need to determine all possible paths for a rat starting at position (0, 0) in a square maze to reach its destination at (N-1, N-1). The maze is represented as an N*N matrix w...read more

Ans.

Find all possible paths for a rat in a maze from source to destination.

  • Use backtracking to explore all possible paths in the maze.

  • Keep track of visited cells to avoid revisiting them.

  • Recursively try moving in all directions (up, down, left, right) until reaching the destination.

  • Add the path to the result list when the destination is reached.

  • Sort the result list alphabetically before returning.

Add your answer
right arrow
Q23. What are the core concepts of indexing in Database Management Systems (DBMS)?
Ans.

Core concepts of indexing in DBMS include types of indexes, benefits of indexing, and factors affecting index performance.

  • Types of indexes: B-tree, Hash, Bitmap, etc.

  • Benefits of indexing: Faster data retrieval, improved query performance, reduced disk I/O.

  • Factors affecting index performance: Selectivity, clustering factor, index fragmentation.

  • Examples: Creating an index on a column in a table to speed up search queries.

Add your answer
right arrow

Q24. What is the role of filter in excel?

Ans.

Filter in Excel is used to sort and display specific data based on certain criteria.

  • Filter allows users to view a subset of data that meets specific conditions.

  • It helps in analyzing and organizing large amounts of data.

  • Filtering can be done based on text, numbers, dates, or custom criteria.

  • Example: Filtering a sales data sheet to display only the transactions from a specific region.

  • Example: Filtering a list of employees to show only those who have a certain job title.

View 1 answer
right arrow

Q25. What is mail merge?

Ans.

Mail merge is a feature in word processing software that allows you to create personalized letters or emails using a template and a list of recipients.

  • Mail merge is used to create personalized letters, envelopes, labels, and emails.

  • It requires a template document and a data source, such as an Excel spreadsheet or a database.

  • The data source contains the information that will be merged into the template, such as names and addresses.

  • Mail merge can save time and effort when sendi...read more

Add your answer
right arrow

Q26. Tell about ur self and what is degital marketing

Add your answer
right arrow

Q27. What is hyperlink?

Ans.

A hyperlink is a clickable link that takes you to another webpage or a specific location on the same webpage.

  • Hyperlinks are commonly used in websites to navigate between pages.

  • They can also be used to link to external resources such as documents or videos.

  • Hyperlinks are created using HTML code and can be styled to appear as text or images.

  • They can be opened in the same window or a new window or tab.

  • Hyperlinks can also be used in spreadsheets and other documents to link to oth...read more

Add your answer
right arrow

Q28. Deep Knowladge of cooking different cuisins?

Ans.

Yes, I have deep knowledge of cooking different cuisines.

  • I have experience cooking various cuisines such as Italian, Mexican, Chinese, and Indian.

  • I am familiar with different cooking techniques and ingredients used in each cuisine.

  • I enjoy experimenting with fusion dishes that combine elements from different cuisines.

  • I keep up with current food trends and am always learning new recipes and techniques.

  • I have received positive feedback from customers and colleagues on my ability...read more

Add your answer
right arrow

Q29. Tell me something about Kolkata

Ans.

Kolkata is a vibrant city located in eastern India, known for its rich history, culture, and cuisine.

  • Kolkata was the capital of British India until 1911

  • It is home to iconic landmarks such as Victoria Memorial and Howrah Bridge

  • The city is famous for its street food, including puchkas and jhal muri

  • Kolkata is also known for its literary and artistic heritage, with notable figures such as Rabindranath Tagore and Satyajit Ray hailing from the city

Add your answer
right arrow

Q30. Tell me something about bpo

Ans.

BPO stands for Business Process Outsourcing. It involves contracting non-core business functions to a third-party provider.

  • BPO services include customer support, technical support, data entry, and back-office operations.

  • Companies outsource these functions to reduce costs and focus on their core competencies.

  • BPO providers are typically located in countries with lower labor costs, such as India and the Philippines.

  • BPO has become a popular industry due to globalization and advan...read more

Add your answer
right arrow
Contribute & help others!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos

Interview Process at Oyo Rooms for Freshers

based on 12 interviews
Interview experience
3.9
Good
View more
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

Microsoft Corporation Logo
4.0
 • 735 Interview Questions
Reliance Industries  Logo
4.0
 • 642 Interview Questions
Teleperformance Logo
3.9
 • 541 Interview Questions
WNS Logo
3.4
 • 283 Interview Questions
Bounteous x Accolite Logo
3.4
 • 177 Interview Questions
iEnergizer Logo
4.6
 • 159 Interview Questions
View all
Recently Viewed
SALARIES
upGrad
SALARIES
upGrad
SALARIES
upGrad
REVIEWS
Central Depository Services (I)
No Reviews
REVIEWS
Central Depository Services (I)
No Reviews
SALARIES
upGrad
SALARIES
upGrad
SALARIES
upGrad
SALARIES
KC Overseas Education
LIST OF COMPANIES
Canara Bank
Locations
Top Oyo Rooms Interview Questions And Answers
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter