you give jug capacity jug1Capacity jug2Capacity liter there infinite water supply available Determine possible measure exactly targetcapacity liter jugsif targetcapacity liter water measurable targetcapacity liter water contain bucket endoperations allowedfill jug waterempty jugspour water jug till jug completely jug example 1input jug1capacity 3 jug2capacity 5 targetcapacity 4output trueexplanation the famous die hard example Example 2input jug1capacity 2 jug2capacity 6 targetcapacity 5output falseexample 3input jug1capacity 1 jug2capacity 2 targetcapacity 3output true Constraints1 jug1capacity jug2Capacity targetcapacity 106