GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Placement Papers  >  Infosys  >  General

 Print  |  
Question:  You have 12 lit oil in my container. And 5, 7 lit weights. So how can u give 6lit oil to me.



July 07, 2005 02:12:40 #3
 Anand Singh   Member Since: Visitor    Total Comments: N/A 

RE: You have 12 lit oil in my container. And 5, 7 lit weights. So how can u give 6lit oil to me.
 
first take 7l from the 12 l bucket, now u would have 5l in the 12l bucket. From the 7l bucket drop 5l to the 5l bucket, now u would have 2 l left in 7l bucket. Dop the 5l to the 12 l bucket leaving you with a total of 10l in 12l bucket. Dop the 2l in 5l bucket leaving you with no oil in the 7l bucket. Again fill the 7l bucket fully, that would leave 3l in the 12l bucket. Fill the 5l bucket, that would leave 4l in the 7l bucket as the 5l bucket was previously filled with 2l. Pour all the oil from the 5l bucket to 12l bucket, that would make 12l bucket to have 8l of oil. Pour all the 4l oil from the 7l bucket on to the 5l bucket. again fill the 7l bucket from the 12l bucket, leaving 1l in the 12l bucket. Now fill the 5l litre bucket, since it is already having 4l it will fill only 1l more leaving 6l in the 7l bucket.
     

 

Back To Question