Famous Google interview question!

Level 1
  • You have a 3 litre jug and 5 litre jug, how do you measure out exactly 4 litre?

  • QUESTION -->[what is the minimum times you fill 3 litre and 5 litre jug from any water resource(tank) ]

- * re-posted problem* ,not genuine problem.

4 2 Not possible 3 1

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Razing Thunder
Jun 21, 2020

- NUMBER 1 - First fill the 3 litre jug.

  • Then pour the 3 litres into the 5 litre jug.

  • Now the 3 litre jug is empty, and the 5 litre jug has 3 litres in it.

  • Fill the 3 litre jug again. Slowly pour into the 5 litre jug. Only 2 litres will fit because it already has 3. Now it’s full.

  • Exactly 1 litre is left in the 3 litre jug.

  • Dump out the 5 litre jug.

  • Pour your 1 litre into the 5 litre jug.

  • Fill up the 3 litre jug one more time and pour it into the 5 litre jug! You have exactly 4 litres (and possibly a job at Google)

  • NUMBER 2

  • Fill the 5 litre jug from source.
  • Pour into 3 jug, leaving 2 litres in the 5 jug.
  • Empty the 3.
  • Pour the 2 litres from the 5 jug into the 3 jug.
  • Fill the 5 litre jug from the source (second time).
  • Pour into 3 jug, leaving 4 litres in the 5 jug.

I used the same technique. Pretty easy for a Google interview question. UP VOTED! This question should get more views, I'll share it.

A Former Brilliant Member - 11 months, 3 weeks ago

Same. Method

A Former Brilliant Member - 11 months, 2 weeks ago

same. method

NSCS 747 - 11 months, 2 weeks ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...