Search Questions

Latest Questions | Page 3

#1

Q. Package Drop Optimization

Uber Connect's package delivery team is reviewing how delivery agents handle packages across multiple zones.

For each of the n delivery zones:
- `scheduledDrop[i]` stores the scheduled time (in minutes) to drop the package in the i-th zone.
- `realDrop[i]` stores the actual time (in minutes) the package was dropped in the i-th zone.

Due to system limitations

Asked in: UBER


Buyer: 0
Code Size: 22
#2

Finally, a basketball court has been opened in SIS, so Demid has decided to hold a basketball exercise session. 2 * n students have come to Demid's exercise session, and he lined them up into two rows of the same size (there are exactly n people in each row). Students are numbered from 1 to n in each row in order from left to right.

Now Demid wants to choose a team to play basketball. He will c

Asked in: AXION


Buyer: 0
Code Size: 27
#3

A company is organizing a batch process, where each batch consists of several task groups arranged in a line and numbered from left to right. Each group currently has a certain number of tasks assigned, represented by the array tasks[], where tasks[i] is the number of tasks in the i-th group.

To optimize the process, the company wants the number of tasks in each group to be non-increasing from

Asked in: DESHAW


Buyer: 1
Code Size: 36
#4

A digital art gallery has an art collection which is represented as a binary string. Each digit in the string represents an artwork and there are two types of artworks: '0' represents a traditional artwork, '1' represents a modern artwork. Your task is to find out the number of ways to choose three artworks in ascending order of their position in the collection, such that no two adjacent selected

Asked in: DESHAW


Buyer: 0
Code Size: 19
#5

Given a series of integer intervals, determine the size of the smallest set that contains at least 2 integers within each interval.

Example:
first = [0, 1, 2]
last = [2, 3, 3]

The intervals start at first[i] and end at last[i].
- Interval 0: [0, 2] → contains 1 and 2
- Interval 1: [1, 3] → contains 2 and 3
- Interval 2: [2, 3] → contains 2 and 3

To satisfy all intervals

Asked in: DPWORLD


Buyer: 1
Code Size: 22
#6

A forklift operator navigates products within an automotive parts warehouse. The dashboard displays a real-time map showing open and blocked sections as an n x m matrix of 1's (open) and 0's (blocked). The operator starts at the top-left corner of the map at warehouse[0][0] and aims to reach the bottom-right corner at warehouse[n-1][m-1]. Movements can only be made to the right or downward. Given

Asked in: DPWORLD


Buyer: 0
Code Size: 17
#7

School renovation

Given N classrooms in a school and each classroom has a capacity of A[i] students. Bob is a builder and follows the instructions of Alice.

Alice gives Q instructions of the following types:
- 1 L 0: Move L classrooms to the left
- 2 R 0: Move R classrooms to the right
- 3 X Y: Remove the next classroom and add two new classrooms of capacity X and Y respectively to the ri

Asked in: ADOBE


Buyer: 0
Code Size: 53
#8

Number in a range

You are given three integers L, R, and K. A number X represents a lucky number if the binary representation of X contains the pattern 101 as a substring. Determine the Kth lucky number between L and R. If the Kth lucky number does not exist, then print -1.

Function description

Complete the solve function. This function takes the following 3 parameters and returns the Kth

Asked in: ADOBE


Buyer: 0
Code Size: 60
#9

You are given a board of size M × N where each cell can be either empty ('O') or a wall ('X').
A robot is initially placed at the top-left cell (0,0) and can move in four directions: up, down, left, and right — but not diagonally.
The robot can only move through empty cells and cannot pass through or land on walls.

Your task is to print the maximum number of empty cells the robot can vi

Asked in: FLIPKART


Buyer: 0
Code Size: 51
#10

Undirected Coloured Graph Shortest Path

You are given an undirected weighted graph G(V, E) where each vertex is assigned a colour. Vertices form pairs of the same colour. Thus, total pairs = V/2 (if V is even) or (V/2)+1 (if V is odd). Each pair is assigned a unique colour.

A query Q specifies a colour, and your task is to find the shortest path (in terms of weight) between the two vertice

Asked in: FLIPKART


Buyer: 0
Code Size: 80