Google Virtual Onsite April 2020 Bangalore
Anonymous User
2429

Question 1:
Merge Intervals With Labels

Question 2:
Card Game

Question 3:

Given an array of +ve numbers and another array of same size with zeros.
Here are the operations you're allowed to perform on the second array.

  1. You're allowerd to increment only a subarray of values. [Subarray has to be a contiguous block]
  2. You're allowerd to increment the values of the subarray by a value of 1.

How many increment operations does it require to transform second array of zeros to the first array?

Input:
[3, 4, 2, 5, 7]

Output: 9

Comments (9)