Interview Question
Jr. Software EngineersCountry: United Kingdom
Interview Type: Written Test
This question is to see how you think logically. BTW: was this a coding question?
If not a coding question, then this is how I would answer it.
1. Make the assumption that the city that the bridge is in has x population.
2. out of x population, make the assumption that y% of people own a vehicle
3. of the y%, how many of those people drive a car, z% (not a motorcycle, truck etc)
4. of the z% of people, assume what percentage live on which side of the bridge
for simplicity, I would say that all the people live on one side of the bridge
5. of the z% of the people who own a car, assume that a% of those people have to
cross the bridge
6. Now since those people have to get back over the bridge to go home, multiple step
five's value by 2. (we make the assumption that the person with the car doesn't make
multiple crossings during the day. Drive across the bridge each way once a day)
So for simplicity.
1. Population: 50 people
2. # people who own a vehicle: lets say 35% of the 50 people rounded up: 18
3. # people who own a car: lets say 95% of the 18: 17
4. 17 people live on one side of the bridge
5. # people of the 17 who have to cross the bridge, lets say 35% --> or 6 people (cars)
6. Therefore, we can say that 12 cars cross the bridge each day.
I am sure that there are more factors to solving this question, but in general, that's how I would answer this question.
what bridge?
- zr.roman June 14, 2016