Tagged: Suppose you have 3 liter and 5 liter jug and fill exact 4 liter in 5 liter jug…