junior bi analyst interview questions shared by candidates
Why do underground stations have three times more exits than entrances? 4 people want to cross a river. You have one barge that can hold no more than two passengers at a time. The first passenger rows at such speed that it takes him 1 min to cross the river. It takes the second 2 min, the third 5 min and the fourth 10 min. When there are two people in the barge, the slowest rower determines the speed at which they cross the river. What is the shortest amount of time in which you can get all 4 people to cross the river?
The key here is to think of entrances as escalators going down and exits as escalators going up. People enter stations few at a time and a crowd builds up progressively on the platform until a train arrives. However, when people exit the train, they all want to get out of the station at the same time, so you need more escalators to let them all out without too much delay. 17 min
The above answer is wrong... The barge needs to return across the river, so it must make 3 journeys each way the return legs would each take one minute with the fastest rower, and as the outward leg is determined by the slowest rower each time (2, 5, and 10 minutes), the fastest time would be 3 + 2 + 5 + 10 = 20 minutes.