| Topic | Difficulty | Companies |
|---|---|---|
| Algorithmic | MEDIUM | Microsoft Amazon Oracle Bloomberg Citrix |
You are at the side of a river. You are given a 3-litre jug and a 5-litre jug. Both the jugs are initially empty. The jugs don’t have markings to allow measuring smaller quantities. You have to use the jugs to measure 4 litres of water. Determine the minimum no of operations to be performed to obtain 4 litres of water in one of the jugs. The operations you can perform are :
The answer is an integer. Just put the number without any decimal places.