Sprinklr Product Engineer Internship
Anonymous User
1190

This is about the first coding round at Sprinklr for Product Engineer Intern.
It was held on hackerearth.
There were totally three questions and 1.5hr time limit.

Question 1: (50 points)
There are N houses in a line each located at coordinates (X_i,0). Every house is to be vaccinated and hence doctors are to be dispatched. Each doctor can cover an area of 'd' radius. Find the minimum number of doctors required to vaccinate all the houses.

Question 2:(75 points)
Given N numbers and x positions. For each position, find the number of continuous subarrays, such that the number at the x position is at the start or the end of the subarray, also the number at the x position is the maximum in the subarray.

Question 3: (100 points)
Two players play a game. There are N coins.
Player 1 picks any coin, while player 2 always picks the leftmost coin.
Both the players take turns, and the game ends when there are no more coins.
If player 1 plays optimally, what is the maximum value of coins he/she can obtain.

Comments (1)