Engineer 1 Interview Questions

1,033 engineer 1 interview questions shared by candidates

Consider you are walking. The task is to drink juice and get the maximum possible power from juices. Juice stalls locations are given as an array x1 < x2 < ….. < xn-1 < xn, specifying position in metres measured from one end of the road. If you drink juice at position xi you receive power of pi > 0. There is a restriction that you cannot drink juice within t metres or less than it. M is the length of the road in metres. Input : M = 20 x = {6, 7, 12, 13, 16, 20} power = {5, 6, 5, 3, 1, 10} t = 5 Ans = 20 (Drink juice from 6, 12 and 20 location)
avatar

SDE-1 Backend Developer

Interviewed at Zeta

3.3
Nov 24, 2024

Consider you are walking. The task is to drink juice and get the maximum possible power from juices. Juice stalls locations are given as an array x1 < x2 < ….. < xn-1 < xn, specifying position in metres measured from one end of the road. If you drink juice at position xi you receive power of pi > 0. There is a restriction that you cannot drink juice within t metres or less than it. M is the length of the road in metres. Input : M = 20 x = {6, 7, 12, 13, 16, 20} power = {5, 6, 5, 3, 1, 10} t = 5 Ans = 20 (Drink juice from 6, 12 and 20 location)

Viewing 811 - 820 interview questions

See Interview Questions for Similar Jobs

Glassdoor has 1,033 interview questions and reports from Engineer 1 interviews. Prepare for your interview. Get hired. Love your job.