Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You 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.



Thanks. 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.


Indeed, it is a specific instance of http://en.wikipedia.org/wiki/Knapsack_problem




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: