Bloomberg NYC new grad phone question
Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2022-10-11Added By Anonymous
Source: Link
Company: Bloomberg
Role: Software Engineer (New Grad)
Stage: Phone Interview
Location: NYC
Year: unknown
Original Experience:
A rover is traversing the circumference of the moon. There are fuel stops along the way at different locations. The 2 inputs are the total distance and the array of locations and fuel amounts. Whats the furthest distance travelled?
Role: Software Engineer (New Grad)
Stage: Phone Interview
Location: NYC
Year: unknown
Original Experience:
A rover is traversing the circumference of the moon. There are fuel stops along the way at different locations. The 2 inputs are the total distance and the array of locations and fuel amounts. Whats the furthest distance travelled?
100, [[0, 10], [10, 30], [60, 40]] //distance would be 80
// start at 60, go 40
// reached 100; meaning circle back; add 10
// reached 10; add 30
50, [[0, 10]] //distance would be 10
// start at 0; add 10 fuel
Help with this question? It's supposedly an island question.