Interview Question

Member of Technical Staff Software Engineer Interview

-

VMware

How many race heats are needed to find the 3 fastest pinewood derby cars out of a field of 8, if only 4 cars can run at a time (assuming that every car will always run the way/speed and each lane is exactly equivalent)?

AnswerAdd Tags

Interview Answers

8 Answers

4

so is the answer 4 heat 1 (first 4 car) + 1 (4 second set) + 1( Top 2 from first + Top 2 from second set) + 1 (3 car heat among the 3rd placed car)

Anonymous on

4

Only two races of four cars in each. Get the times of all cars and sort them. You don't need any more races because the times will be the same in subsequent races. :)

Rodrigo on

1

4 if we cant measure time

lolcoder on

0

3 if we cannot measure time.

manish on

0

Choose 4 cars at random for the first race. Trivially the slowest car in that race can be removed from consideration. For the second race randomly choose 3 previously untested cars as well as the third place car from race one. If the car from race one wins then all other cars in race 2 are slower than all of top three cars in race one and may be discarded. Similarly if the car from race one is in last place all of the cars from the first race may be removed from contention. In effect, regardless of how this car performs in the second race three additional cars may be removed from consideration. With one car removed in the first race and three additional cars removed in the second only 4 cars remain. The remaining four cars may be raced simultaneously in a third race to provide the final solution.

Anonymous on

0

4 rounds choose 4 cars for the first round, and the other four from the second round; this makes up two round. The lowest cars in both round definitely cannot be part of the best 3. In the third heat, the last four cars from the first two rounds make up another round. At this point, its either all three in one round are the fastest, or the fastest two in one round and the best in the other. The winning 2 in this round are selected and a last round to determine the fastest three.

Fnut on

0

There's a lot of elements to typically cover in these questions, clarifications, scoping, making sure you're answering the actual question the interviewer is looking for you to answer, etc. Could be worth doing a mock interview with one of the Prepfully VMware Member of Technical Staff Software Engineer experts... they've worked in the role so they clearly know how to get through the interview. prepfully.com/practice-interviews

Anonymous on

0

Each heat rules out 1 car (that cannot be one of the 3 fastest).

Anonymous on

Add Answers or Comments

To comment on this, Sign In or Sign Up.