3 ms·
Never heard the family crossing the bridge one. Which one is that?
by debacle 14y ago
Never heard the family crossing the bridge one. Which one is that?
- potatolicious 14y agoYou have a bridge that can only take a certain amount of weight at once without collapsing. It's dark at night and you have only one flashlight. A flashlight is required to cross the bridge, which is traversable in both directions. You have a family of people of varying weights (the exact numbers you'd have to look up) - determine the optimal way for the family to make it across the bridge.
- debacle 14y agoThanks. I don't think that's a bad one. In fact, like the Towers of Hanoi, I think it has enough parallels with computer science and engineering to be a good interview question.
- usea 14y agoIndeed, it is a specific instance of http://en.wikipedia.org/wiki/Knapsack_problem http://en.wikipedia.org/wiki/Knapsack_problem