Cisco Cisco OA-3 2022 Problem Description Sherlock Airlines has introduced a unique method to manage travelers who don't plan ahead and often try to book the same seat numbers at the travel desk, causing delays since only one person can occupy a seat. The seating arrangement consists of seats in a straight
Oracle Oracle OA-4 2023 Problem Description Given a list of n items accessed in sequence from a system, and a cache with Least Recently Used (LRU) replacement policy, the goal is to determine the minimum cache size required to ensure at least k requests hit the cache. If it is not possible to achieve
JP Morgan JP Morgan OA-4 2023 Problem Description You are provided with two arrays, arr1 and arr2, with sizes N and M respectively. Your task is to perform the following operations: 1. Intersection: Find all elements that appear in both arrays. 2. Union: Find all unique elements from both arrays, combining them while removing any duplicates.
Flipkart Flipkart OA-4 2023 Problem Description An e-commerce company’s warehouse is represented as an N x M grid in their system. Each cell in the grid represents a storage unit where goods are stored, and the value of each cell indicates the total count of goods in that unit. * Robot 1 starts at
Intuit Intuit OA-4 2023 Problem Description A company team wants to plan a group outing to a nearby location, Hilltown. All company taxis are stationed at the office. Each taxi must pick up employees from their homes, take them to Hilltown, drop them off, return them to their homes, and finally report back to
Zomato Zomato OA-4 2022 Problem Description There are N individuals. For each pair of people (i, j), their friendship value is given by A[i][j]. The goal is to divide these N people into two distinct groups such that every individual belongs to exactly one group, and both groups contain at least one
Uber Uber OA-4 2023 Problem Description You are tasked with ensuring that the prices of cars, initially arranged in a line, become non-decreasing as quickly as possible. The price of each car is given as an array. You can perform operations over multiple chances to adjust the car prices. At each chance X, you
Juspay Juspay OA-4 2023 Problem Description You are given a forest with N nodes, where each node has an integer value from 0 to N-1. For two given nodes x1 and x2, your task is to find their nearest common ancestor. The forest can consist of one or more trees. The root of each
Salesforce Salesforce OA-4 2023 Problem Description Kitty is locked inside a horror house where there are distinct random words written on the wall. Inside the house, Kitty encounters a ghost who offers to help on one condition. The ghost will give Kitty a word, and Kitty must determine whether she can create this word
Morgan Stanley Morgan Stanley OA-3 2022 Problem Description An online streaming application wishes to analyze the popularity of web series streaming on their platform. Each web series is given a unique ID, and users vote for their favorite series. To analyze popularity, the marketing team has selected N users (with IDs from 0 to N-1) and
Cisco Cisco OA-4 2022 Problem Description You have four jugs, labeled [J1, J2, J3, J4], with capacities [C1, C2, C3, C4] and initial water amounts of [S1, S2, S3, S4]. The objective is to determine how many steps are required to reach the final state of [F1, F2, F3, F4] by transferring water between
Oracle Oracle OA-5 2023 Problem Description In an organization, there are n servers, each with a capacity of capacity[i]. A contiguous subsegment [l, r] of servers is said to be stable if capacity[l] = capacity[r] = sum[l+1, r-1]. In other words, the capacity of the servers at the endpoints of the
JP Morgan JP Morgan OA-5 2024 Problem Description Ram and Shyam are two hackers engaged in a game. They are given a list of non-empty strings, where each string represents a round of the game. For each round, return the name of the winner as an array of strings. Game Rules: * Ram always takes the first
Flipkart Flipkart OA-5 2023 Problem Description In an organization with N employees, each employee has a unique ID ranging from 1 to N. Based on performance in the last financial year, each employee is given a performance score. The company's overall performance target for the year is represented by K. The task
Intuit Intuit OA-5 2024 Problem Description Alex is a stunt performer in a circus arena structured as an m*n grid. He is preparing for an exciting new stunt where a fire ignites from a given point (fx, fy). Alex begins his stunt at a start point (ix, iy) and needs to reach a
Zomato Zomato OA-5 2022 Problem Description Imagine a system where vehicles travel in multiples of 1 kilometer. A vehicle can either remain stationary or travel distances like 2 km, 5 km, or 10 km, but not fractional distances such as 2.5 km or 6.34 km. In this system, a traffic officer stands
Morgan Stanley Morgan Stanley OA-5 2022 Problem Description You are given two lists of positive integers. Write an algorithm to calculate the number of elements that are not common between the two lists. Input Format 1. The first line of the input consists of an integer, listinput1_size, representing the number of elements in the first
Juspay Juspay OA-5 2023 Problem Description You are given a maze with N cells. Each cell may have multiple entry points but not more than one exit (i.e., entry/exit points are unidirectional doors like valves). You need to find the sum of the largest sum cycle in the maze. * Each cell is
Salesforce SalesForce OA-5 2023 Problem Description You are given an M * N binary matrix representing the shape of an item that is supposed to be packed for shipping. The item is contiguous, meaning it consists of a connected group of 1s, either horizontally or vertically. The shipping agency only has rectangular boxes available, and
Cisco Cisco OA-5 2022 Problem Description Find the maximum number of elements in a given array that sum up to a given target. Input: 1. The first line specifies the number of elements in the array 2. The second line specifies the target. 3. The third lines contain the elements of the array (Integers)
Oracle Oracle OA-6 2023 Problem Description Given a binary string binary consisting of characters '0' and '1' only, perform the following 0 or more times: * Choose any subsequence, sort the subsequence, and replace the original subsequence with the sorted sequence. Next, there is an array of strings, arr, of length
Flipkart Flipkart OA-6 2023 Problem Description In a warehouse, items are categorized as either electronic or non-electronic. The electronic items are represented by the vowels in the English alphabet: a, e, i, o, u. Non-electronic items are represented by any consonant. The warehouse manager needs an application to facilitate the transfer of goods to
Morgan Stanley Morgan Stanley OA-6 2022 Problem Description A company sells products at N outlets, which are connected to each other by a series of roads. There is only one way to travel between any two outlets. Each outlet has a unique ID, and when the inventory of a certain product reaches a minimum level, K
Juspay Juspay OA-6 2023 Problem Description You are given a maze with N cells, where each cell may have multiple entry points but no more than one exit (i.e., entry/exit points are unidirectional like valves). The cells are numbered from 0 to N-1. You are tasked with finding the nearest meeting cell
Salesforce SalesForce OA-6 2023 Problem Description Tom wants to catch Jerry by digging M holes on a straight track. Each hole has a certain depth, and digging a one-unit deep hole takes one unit of time. Since Tom is lazy, he asks N fellow cats to help him dig the holes. Tom assigns each