Search Questions

Company: ADOBE

#1

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:
#2

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: