Jump to content
Sign in to follow this  
chconline

Amazon Interview Question

Recommended Posts

Saw this today:

 

“Having an infinite supply of water and two containers, one for three litres and one for five litres, how would you measure four litres?”

 

I looked online, but I could not find any answers. I gave it a shot. Try solving it and then look at the spoiler tag to see what you get :P

 

 

First, take the 3L and put it in the 5L container. Assume negligible structural thickness of the container, and it fits in it the larger one completely. Fill up the 5L jug to the brim. Since the 3L jug is inside, it can only accommodate 2L of water.

Next, pour the water from the 5L container into the 3L container. That's your first 2L of water. Put the 3L container in the 5L container as earlier, and then fill up the 5L container again to get 2L. Pour the 2L stored in the 3L container earlier into the 5L container. This will make your 4L.

 

Share this post


Link to post
Share on other sites

Assuming that the containers are not completely open from the top and cannot be physically put inside one another (applying to most all containers :P)...

 

 

 

Start with two empty containers, a 3L and a 5L (0:0)

Fill the 5L container (0:5)

Pour the 5L container into the 3L container (3:2)

Empty out the 3L container (0:2)

Pour the 5L container into the 3L container (2:0)

Fill the 5L container back up (2:5)

Pour the 5L container back into the 3L container (3:4)

Now you have your 4L in the 5L container, and a bonus filled 3L container

 

 

Edited by HopkinsProgramming

Share this post


Link to post
Share on other sites

^ I have to say, that's a good answer (Y)

 

When they mentioned containers, the first thing I thought of were beakers, lol.

Share this post


Link to post
Share on other sites

This is probably Wrong but...

 

:P

Best response.

 

Actually this question is quite common... I'm pretty sure I saw this during an interview (not for a job, but for a scholarship)

Share this post


Link to post
Share on other sites

This is probably Wrong but...

 

 

Fill the 5L jug 4/5ths.

 

 

:P

Now that's just completely disrespecting the point of the question :P

 

Here's my other solution:

 

 

Sell the 5L and 3L container and buy a 4L container instead. Keep the extra change if you have any.

 

Share this post


Link to post
Share on other sites

 

Fill up the 3L and put it in the 5L, fill up 3L again and put it in the 5L, collect the extra 1L and repeat 3 more times.

 

 

Edit: LOL @ chc's second answer and BB.

Edited by TL6MT

Share this post


Link to post
Share on other sites

 

Fill up the 3L and put it in the 5L, fill up 3L again and put it in the 5L, collect the extra 1L and repeat 3 more times.

 

 

Edit: LOL @ chc's second answer and BB.

I don't think that'll work. You only have 2 containers, and there is no way you can collect the remainder.

Share this post


Link to post
Share on other sites

Now that's just completely disrespecting the point of the question :P

 

Here's my other solution:

 

 

Sell the 5L and 3L container and buy a 4L container instead. Keep the extra change if you have any.

 

:rofl:

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...