Question: Problem: Given 4 Jugs namely U 1 , J 2 , J 3 , J 4 ] with capacities [ C 1 , C 2

Problem:
Given 4 Jugs namely U1, J2, J3, J4] with capacities [C1, C2, C3, C4] and initial water content as [SY, S2, S3, S4].
Goal:
Determine how many steps are needed to achieve the final state of [F1, F2, F3, F4] by transferring water from one jug to another without losing any water.
Constraints:
1.0< Ci <=500 for each i : [1,4]
2.0< Si, Fi <= Ci for each i : [1,4]
3. Sum(Si)= Sum(Fi)
Input:
Total number of entries =13

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!