Water Jug Problem: 5 liter jug and 7 liter jug are provided. Measure 6 liter within the 7 liter jug.
Let, we have infinite supply of water and two jugs capable to contain exactly 7 and 5 liters. Measure 6 liter within in 7 liter jug. Step 01: Fill up the 7 liter => (7, 0) Step 02: Pour into the 5 liter => (2, 5) Step 03: Empty the 5 liter => (2, 0) Step 04: Pour into the 5 liter => (0, 2) Step 05: Fill up the 7 liter => (7, 2) Step 06: Pour into the 5 liter => (4, 5) Step 07: empty the 5 liter => (4, 0) Step 08: Pour into the 5 liter => (0, 4) Step 09: Fill up the 7 liter => (7, 4) Step 10: Pour into the 5 liter => (6,5) Step 11: Empty the 5 liter => (6, 0) Now 7 liter jug contain 6 liter water. -- Cheers !!!