Coolmcoolieo Wrote:McCule Wrote:Microsoft Interview Question Example No.2:
If you had a bucket that holds 5 gallons of water and a bucket that holds 3 gallons of water, how could you accurately determine exactly 4 gallons of water?
1/2 of 5 gallon and 1/2 of 3 gallon= 4 gallons
Can't be precise just like that. The Die Hard way is the way.
Fill up the three and dump it in the five. Fill up the three again and dump what you can in the five leaving 1 gallon in the three. Dump out the five and pour the 1 gallon from the three in the five. Fill up the three again and dump it in the five. There's now 4 gallons in the five.
yah bruce willis and samuel l jackson already showed us how to do this
You could also fill up the five and dump it in the three leaving 2 gallons in the five. Then dump out the three and put the two gallons from the five into the three. Then there's 1 gallon of empty space in the three. Fill up the five and dump one gallon into the three leaving 4 gallons in the five.
just add the three and five...weigh...divide by 2.
so hard
under the circumstances of Die Hard 3, if you tried it like that playajam you would be dead. As soon as you weighed the 8 gallons the bomb would have blown up.
no one said anything about a bomb...regardless, i think a gallon of water weighs 8 lbs. so, 32 lbs. booyah
ok again i dont think you understand what im saying. every way you have said to solve the riddle is wrong. you dont have a scale. whats the point of a riddle like that if you can just put it on a scale and weigh it?
the difficult part is doing it WITHOUT a scale. knowing a gallon of water weighs 8 lbs means nothing.
you would have to do it one of ghostriders way to be exact, with out a scale.
i guess i really didn't care enough to actually read the question. these questions are silly...there are scales in the real world. no need to find convoluted solutions to simple questions
what baffles me is that you've never seen die hard 3!