Oyo Rooms
20+ Apollo Global Management Interview Questions and Answers
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
Q2. Fixing a Swapped Binary Search Tree
Given a Binary Search Tree (BST) where two nodes have been swapped by mistake, your task is to restore or fix the BST without changing its structure.
Input:
The first line of...read more
Q3. Water Jug Problem Statement
You have two water jugs with capacities X
and Y
liters respectively, both initially empty. You also have an infinite water supply. The goal is to determine if it is possible to measu...read more
Q4. 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
Q5. 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
Q6. 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
Q7. Problem Statement: Largest Island
You are provided with a non-empty grid consisting of only 0s and 1s. Your task is to determine the maximum area of an island within the given grid.
An island consists of a clus...read more
Q8. Position of Right Most Set Bit
Determine the position of the rightmost set bit in the binary representation of a given number N.
Input:
T: Number of test cases
N: An integer for which the position of the rightmo...read more
Q9. 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
Q10. 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
Q11. 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
Q12. Word Search Problem Statement
Given a two-dimensional grid of size N x M
consisting of upper case characters and a string 'WORD', determine how many times the 'WORD' appears in the grid.
The 'WORD' can be forme...read more
Q13. Pythagorean Triplet Problem
Determine if there exists a Pythagorean triplet within a given array of integers. A Pythagorean triplet consists of three numbers, x, y, and z, such that x^2 + y^2 = z^2.
Explanation...read more
Q14. Top View of Binary Tree Problem Statement
Given a Binary Tree of integers, you are tasked with finding the top view of the binary tree. The top view is the set of nodes visible when the tree is viewed from the ...read more
Q15. 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
Q16. 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
Implement Stack with Linked List
Your task is to implement a Stack data structure using a Singly Linked List.
Explanation:
Create a class named Stack
which supports the following operations, each in O(1) time:
Q18. 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
Q19. 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
Q20. Rotate Matrix Right K Times
You are given a matrix MAT
of size 'N' * 'M', where 'N' is the number of rows and 'M' is the number of columns, along with a positive integer 'K'. Your task is to rotate the matrix t...read more
Q21. 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
Q23. merge sort algorithm and divide array in the chunks
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).
Q24. Reverse a LinkedList from m to n
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
Interview Process at Apollo Global Management
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month