This is a frequently asked question in General topics for interview.   This question is usually asked to check mathematical and logical reasoning. Here's how to answer the question: "We all know the three-gallon bucket is small, and the five-gallon is big. Here we can assume that the final four gallons will end up in a five-gallon bucket. The first step is - Fill the three-gallon bucket and pour all the liquid into the five-gallon bucket. Now because 5-3=2, we know two more gallons can fit in the five-gallon bucket. So, we will fill in the tree gallon bucket again and pour it into the five-gallon bucket until it is full.  Now 3-2=1, so there's one gallon in a three-gallon bucket. We throw the water and fill it in with one gallon. Then, we fill in the three bucket gallons again and pour them into the five-gallon water. Here, we have four gallons of water."