This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.

You are given two strings of length X each and one lighter.Burning of each string completely takes 60 minutes.Burning time is not necessarily proportional to length,means its not necessary that in 30 minutes exactly half of the string will get burned. Now you want to count 45 minutes.How will you do it?

Put the two strings apart from each other. Light both ends of first string and one end of second string. When the first string is completely burned out, exactly 30 min have been passed, which means that the second string has exactly 30 min left to burn. Light the other end of the second string. It will now burn out twice as fast in exactly 15 min. The total burning time is 45 min.

Am I missing something. [ October 17, 2005: Message edited by: Sameer Jamal ]