Adobe
10+ Genesys Telecommunications Laboratories Interview Questions and Answers
Q1. Morty's Array Challenge
Rick has provided Morty with an array 'Arr' of length 'N' and an integer 'K'. Morty needs to split the array into non-empty sub-arrays to achieve the minimum possible cost, subject to th...read more
The challenge involves splitting an array into sub-arrays to minimize cost based on unique elements and repetitions.
Iterate through the array and keep track of unique elements and repetitions
Calculate cost for each sub-array based on the rules provided
Sum up the costs for all sub-arrays to get the total minimum cost
Q2. Longest Common Prime Subsequence Problem Statement
Imagine Ninja is tackling a puzzle during his long summer vacation. He has two arrays of integers, each with lengths 'N' and 'M'. Ninja's task is to determine ...read more
Find the length of the longest subsequence common to two arrays consisting only of prime numbers.
Iterate through both arrays and check if the numbers are prime.
Use dynamic programming to find the longest common subsequence of prime numbers.
Keep track of the length of the common prime subsequence.
Return the length of the longest common prime subsequence.
Q3. Minimum Fountains Activation Problem
In this problem, you have a one-dimensional garden of length 'N'. Each position from 0 to 'N' has a fountain that can provide water to the garden up to a certain range. Thus...read more
Find the minimum number of fountains to activate to water the entire garden.
Iterate through the array and keep track of the farthest point each fountain can cover.
Activate the fountain that covers the farthest point not covered by any previous fountain.
Continue this process until the entire garden is covered.
Return the count of activated fountains as the minimum number required.
Q4. Equilibrium Index Problem Statement
Given an array Arr
consisting of N integers, your task is to find the equilibrium index of the array.
An index is considered as an equilibrium index if the sum of elements of...read more
Find the equilibrium index of an array where sum of elements on left equals sum of elements on right.
Iterate through the array and calculate the total sum of elements.
For each index, calculate the sum of elements on the left and right side and check for equilibrium.
Return the left-most equilibrium index found, or -1 if none exist.
Q5. Maximum Meetings Problem Statement
Given the schedule of N meetings with their start time Start[i]
and end time End[i]
, you need to determine which meetings can be organized in a single meeting room such that t...read more
Given N meetings with start and end times, find the maximum number of meetings that can be organized in a single room without overlap.
Sort the meetings based on end times.
Iterate through the sorted meetings and select the next meeting whose start time is greater than or equal to the end time of the previous meeting.
Return the selected meetings in the order they are organized.
Q6. Split Array Problem Statement
You are given an integer array/list arr
of size N
. Your task is to split the array into the maximum number of subarrays such that the first and last occurrence of every distinct el...read more
Split the array into maximum number of subarrays such that first and last occurrence of every distinct element lies within a single subarray.
Iterate through the array and keep track of the first and last occurrence of each element.
Use a hashmap to store the indices of each element.
Count the number of subarrays where the first and last occurrence of each element are within the same subarray.
Q7. Split Array into 'K' Consecutive Subarrays Problem
Given an integer array arr
of size N
, determine if it is possible to split the array into K
consecutive non-overlapping subarrays of length M
such that each su...read more
The problem involves splitting an array into 'K' consecutive subarrays of length 'M' with each subarray containing a single distinct element.
Iterate through the array and check if each subarray of length 'M' contains only one distinct element.
Keep track of the count of distinct elements in each subarray.
Return 1 if it is possible to split the array according to the condition, otherwise return 0.
Q8. Equalize Water in Buckets
You are provided with an array, ARR
, of positive integers. Each integer represents the number of liters of water in a bucket. The goal is to make the water volume in each bucket equal ...read more
Given an array of positive integers representing water in buckets, find the minimum amount of water to be removed to equalize all buckets.
Sort the array in non-decreasing order to easily identify the buckets with excess water.
Calculate the average water volume by dividing the total water volume by the number of buckets.
Iterate through the array and calculate the excess water in each bucket compared to the average.
Sum up the excess water in all buckets to get the minimum amoun...read more
Q9. 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
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.
Explore all possible directions (up, down, left, right) from each cell.
Add the current direction to the path and recursively explore further.
When reaching the destination, add the path to the list of valid paths.
Q10. Minimize Cash Flow Problem
You are provided with a list of 'transactions' involving 'n' friends who owe each other money. Each entry in the list contains information about a receiver, sender, and the transactio...read more
Minimize cash flow among friends by optimizing transactions.
Create a graph where nodes represent friends and edges represent transactions.
Calculate net amount each friend owes or is owed.
Use a recursive algorithm to settle debts by minimizing cash flow.
Update the graph after each transaction to reflect the new balances.
Repeat the process until all balances are settled.
Q11. Longest Zero Sum Subarray Problem
Given an array of integers consisting of both positive and negative numbers, find the length of the longest subarray whose sum is zero. This problem will be presented with mult...read more
Find the length of the longest subarray with zero sum in an array of integers.
Iterate through the array and keep track of the running sum using a hashmap.
If the running sum is seen before, it means there is a subarray with zero sum.
Calculate the length of the subarray with zero sum and update the maximum length found so far.
Overloading pre and post-increment operators in OOP involves defining special member functions for the class.
Define member functions for pre-increment (++obj) and post-increment (obj++) operators in the class.
For pre-increment, return a reference to the modified object after incrementing the value.
For post-increment, return a copy of the original object before incrementing the value.
Example: class Counter { int value; Counter& operator++() { value++; return *this; } Counter o...read more
More about working at Adobe
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month