Engineer Developer Interview Questions

467,806 engineer developer interview questions shared by candidates

There are ten buckets of lead weights, with nine of them having equal weights of 10 grams each, while one of them has weights of 11 grams each. You want to find out which bucket has weights of 11 grams each, by using a scale, but you can only turn on the scale once.
avatar

Software Engineer Intern

Interviewed at Cisco

4.1
Sep 10, 2013

There are ten buckets of lead weights, with nine of them having equal weights of 10 grams each, while one of them has weights of 11 grams each. You want to find out which bucket has weights of 11 grams each, by using a scale, but you can only turn on the scale once.

One of the questions was asked by Ahmed Bashir, who (I later learned) was a Director level and the manager of the hiring manager. The question was as follows. You are given 25 horses. In each race only up to 5 horses can run and each race only reveals the ranking between the horses (i.e., we do not know the actual time). What is the minimum number of races you need to have in order to reveal the 3 fastest horses between the 25.
avatar

Software Engineer

Interviewed at Apple

4.1
Feb 3, 2019

One of the questions was asked by Ahmed Bashir, who (I later learned) was a Director level and the manager of the hiring manager. The question was as follows. You are given 25 horses. In each race only up to 5 horses can run and each race only reveals the ranking between the horses (i.e., we do not know the actual time). What is the minimum number of races you need to have in order to reveal the 3 fastest horses between the 25.

''' We want to implement a feature to suggest to users the cheapest hotel that is more popular than the one they are looking at. Write a function that given an array of hotels, sorted by their popularity returns a map from the hotel ids that associates each hotel with the cheapest hotel that is more popular than the one in question. if there is no hotel that is cheaper and more popular than the one with that id, then it shouldn't be put in the map. You can assume that hotel ids and prices are integers and that hotels have the following format: struct hotel{ int id; int price; } Example 1: input = [ { id => 123, price => 200 }, # Most popular { id => 55, price => 150 }, # Second most popular { id => 17, price => 70 }, # Third most popular { id => 18, price => 500 }, # ... { id => 27, price => 270 }, { id => 101, price => 230 } # Least popular ] output = { 18 : 17, 27 : 17, 101 : 17 }
avatar

Software Developer

Interviewed at Booking.com

4
Mar 4, 2018

''' We want to implement a feature to suggest to users the cheapest hotel that is more popular than the one they are looking at. Write a function that given an array of hotels, sorted by their popularity returns a map from the hotel ids that associates each hotel with the cheapest hotel that is more popular than the one in question. if there is no hotel that is cheaper and more popular than the one with that id, then it shouldn't be put in the map. You can assume that hotel ids and prices are integers and that hotels have the following format: struct hotel{ int id; int price; } Example 1: input = [ { id => 123, price => 200 }, # Most popular { id => 55, price => 150 }, # Second most popular { id => 17, price => 70 }, # Third most popular { id => 18, price => 500 }, # ... { id => 27, price => 270 }, { id => 101, price => 230 } # Least popular ] output = { 18 : 17, 27 : 17, 101 : 17 }

Viewing 1971 - 1980 interview questions

Glassdoor has 467,806 interview questions and reports from Engineer developer interviews. Prepare for your interview. Get hired. Love your job.