This problem is commonly cited as a Microsoft interview problem, although I have paraphrased it here to involve a river and a boat instead of a bridge and a flashlight, and tweaked the crossing times a little bit.
There are four people standing on one side of a river, and they need to cross it as quickly as possible to the other side. However, there is only one rowboat docked at the river's bank, and only two people can fit in it. These four people can row to the other side in 3, 7, 12 and 15 minutes, and if two people cross, they must row at the rate of the slower person. How can these four people cross as quickly as possible, and how long will it take them?