Add office photos
Engaged Employer

Oyo Rooms

3.3
based on 3.5k Reviews
Filter interviews by

20+ Interview Questions and Answers

Updated 6 Feb 2024
Popular Designations
Q1. Minimum Cost to Destination

You have been given an N*M matrix where there are 'N' rows and 'M' columns filled with '0s' and '1s'.


'1' means you can use the cell, and '0' means the cell is blocked. You can move ...read more

View 4 more answers
Q2. Fix BST

Given a Binary Search Tree, where exactly two nodes of the same tree were swapped by mistake. The task is to restore or fix the BST, without changing its structure.

A binary search tree (BST), also calle...read more

View 5 more answers
Q3. Water Jug Problem

You are given two water jugs with capacities X and Y litres respectively. Both the jugs are initially empty. There is an infinite amount of water supply available. The jugs do not have markings...read more

View 2 more answers
Q4. Ways To Make Coin Change

You are given an infinite supply of coins of each of denominations D = {D0, D1, D2, D3, ...... Dn-1}. You need to figure out the total number of ways W, in which you can make a change fo...read more

View 4 more answers
Discover null interview dos and don'ts from real experiences
Q5. Count Ways To Travel Triangular Pyramid

Bob has been given a triangular pyramid with its vertices marked as ‘O’, ‘X’, ‘Y’ and ‘Z’ and provided with another integer ‘N’. In a single step, Bob can go to any adjace...read more

View 3 more answers
Q6. Zig-Zag String

You are given a string ‘STR’ of size ‘N’ and an integer ‘M’ (the number of rows in the zig-zag pattern of ‘STR’). Your task is to return the string formed by concatenating all ‘M’ rows when string...read more

View 2 more answers
Are these interview questions helpful?
Q7. Largest Island

You have been given a non-empty grid consisting of only 0s and 1s. You have to find the maximum area of an island in the given grid.

An island is a group of 1s (representing land) connected horizo...read more

View 3 more answers
Q8. Position of Right Most Set Bit

You are given a number N. You need to return the position of the rightmost set bit.

For example:
If the given number is 10 with the binary representation: 1010 The rightmost set b...read more
View 3 more answers
Share interview questions and help millions of jobseekers 🌟
Q9. Maximum Profit

Mukesh is a hard worker and has a good running business. He has a list of profits he made in the last ‘N’ days. Mukesh wants to know what maximum profit he made in the few consecutive days. More P...read more

View 2 more answers
Q10. Maximum sum such that no two elements are adjacent

You are given an array/list of ‘N’ integers. You are supposed to return the maximum sum of the subsequence with the constraint that no two elements are adjacent...read more

View 3 more answers
Q11. Number Of Pairs With Given Sum

You have been given an integer array/list(arr) and a number 'Sum'. Find and return the total number of pairs in the array/list which when added, results equal to the 'Sum'.

Note:
G...read more
View 3 more answers
Q12. Word Search

You are given a two-dimensional grid having 'N' rows and 'M' columns, consisting of upper case characters. You are also given a word 'WORD'. You have to find the number of occurrences of that word i...read more

View 3 more answers
Q13. Pythagorean Triplet

You are given an array of n integers (a1, a2,....,an), you need to find if the array contains a pythagorean triplet or not.

An array is said to have a pythagorean triplet if there exists thre...read more

View 3 more answers
Q14. Top View of Binary Tree

You are given a Binary Tree of integers. You are supposed to return the top view of the given binary tree. The Top view of the binary tree is the set of nodes that are visible when we see...read more

View 3 more answers
Q15. Boundary Traversal

You have been given a binary tree of integers. Your task is to print the boundary nodes of this binary tree in Anti-Clockwise direction starting from the root node.

NOTE:
The boundary nodes of...read more
Add your answer
Q16. Possible to form a triangle

You are given an integer of array/list 'ARR' of length ‘N. You are supposed to return true if it is possible to construct at least one non-degenerate triangle using values of array/li...read more

View 3 more answers
Q17. Implement Stack with Linked List

You need to implement the Stack data structure using a Singly Linked List.

Create a class named 'Stack' which supports the following operations(all in O(1) time):


getSize: Retur...read more
Add your answer
Q18. Running Median

You are given a stream of 'N' integers. For every 'i-th' integer added to the running list of integers, print the resulting median.

Input Format :
The fi...read more
View 3 more answers
Q19. Rotate Matrix right by K times

You have been given a matrix ‘MAT’ of size 'N' * 'M' (where 'N' and 'M' denote the number of rows and columns respectively) and a positive integer ‘K’. Your task is to rotate the m...read more

Add your answer
Q20. Rat In A Maze

You are given a starting position for a rat which is stuck in a maze at an initial point (0, 0) (the maze can be thought of as a 2-dimensional plane). The maze would be given in the form of a squar...read more

Add your answer
Q21. Sum Tree

For a given binary tree, convert it to its sum tree. That is, replace every node data with sum of its immediate children, keeping leaf nodes 0. Finally, return its preorder.

For example:
The input for t...read more
Add your answer
Q22. Technical Questions

Questions on DBMS, Os, Puzzles, Your projects.

What is indexing?

CPU Scheduling algos.

Add your answer
Q23. Given a 2D matrix having 0s and 1s, each row is sorted. Find the row having the maximum number of consecutive ones in the matrix.
Add your answer
Q24. Given N documents and a set of keywords was given, you have to retrieve document having highest frequency of those keywords first and then others.
Add your answer
Q25. OS Questions

Core concepts like deadlock, semaphore, memory management

Add your answer
Q26. DBMS Question

Core concepts like indexing

Add your answer

Q27. merge sort algorithm and divide array in the chunks

Ans.

Merge sort is a sorting algorithm that divides an array into smaller chunks and then merges them in sorted order.

  • Merge sort is a divide-and-conquer algorithm.

  • It recursively divides the array into two halves until each subarray has only one element.

  • Then it merges the subarrays in sorted order.

  • The merge step compares elements from both subarrays and places them in the correct order.

  • It has a time complexity of O(n log n).

Add your answer

Q28. Reverse a LinkedList from m to n

Ans.

Reverse a LinkedList from m to n

  • Traverse the list to m-1th node

  • Reverse the nodes from m to n

  • Connect the reversed list to the original list

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Developer Interview Questions from Similar Companies

3.8
 • 46 Interview Questions
3.5
 • 26 Interview Questions
3.5
 • 11 Interview Questions
3.1
 • 10 Interview Questions
3.5
 • 10 Interview Questions
4.0
 • 10 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

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