You want to boil a two-minute egg. If you only have a three-minute timer (hourglass), a four-minute timer and a five-minute timer, how can you boil the egg for only two minutes?
Four people need to cross a rickety bridge at night. Unfortunately, they have only one torch and the bridge is too dangerous to cross without one. The bridge is only strong enough to support two people at a time. Not all people take the same time to cross the bridge. Times for each person: 1 min, 2 mins, 7 mins and 10 mins. What is the shortest time needed for all four of them to cross the bridge?
The LCD device should be able to tell the right time in the format HH:MM: SS in a 12-hour format. You can refer to the picture to get an idea. The device is a simple "level indicator" which has to be converted into a watch. How will you program it to work?