the string burns in an hour if lit from one end and string burns in 30 min if lit from both ends. This fact is based on - light up the string from "either" end it burns in 60 min.
now heres the solution: Light up the first string from both ends and the second string from one end at the same time. When the first string burns up completely, light up the already burning second string from the other end. When the second string burns up, we have 45 min irrespective of the burn rate. Even if you assume some different values of burn rate to make the overall burn rate variable, you would get 45 min only. On Jul 9, 5:11 am, "oppilas ." <jatka.oppimi...@gmail.com> wrote: > You have 2 pieces of string of different, unspecified length, and some > matches. Each piece of string takes exactly an hour to burn, but the burn > rate is not constant. . The strings have different burn rates, and of course > you don't know the rates anyway. > > Using only the matches and the strings, measure 45 minutes. > > I have thought a lot but unable to find a solution for this problem. Can > someone please try it. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.