VMware Interview Question: How many race heats are neede... | Glassdoor

Interview Question

Member of Technical Staff Software Engineer Interview Palo Alto, CA

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)?
Answer

Interview Answer

7 Answers

0

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

Interview Candidate on Jun 12, 2012
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 Jun 27, 2012
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 Jul 27, 2012
1

4 if we cant measure time

lolcoder on Dec 20, 2013
0

3 if we cannot measure time.

manish on Jun 8, 2015
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 Aug 21, 2015
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 Apr 7, 2016

Add Answers or Comments

To comment on this, Sign In or Sign Up.