aayushi-droid / Edabit-Solutions

Edabit Solutions using Cpp(C++)
MIT License
39 stars 154 forks source link

Water Jug Problem #49

Closed Jayshah6699 closed 3 years ago

Jayshah6699 commented 4 years ago

Before jumping into Pr first comment for assign.

Problem statement : Given a set of 3 jugs of water that have capacities of a, b, and c liters, find the minimum number of operations performed before each jug has x, y, and z liters. Only jug C will start completely filled.

An operation is any of the following: A jug is emptied, a jug is filled, or water is poured from one jug to another until one of the jugs is either empty or full.

For example, jugs A, B, and C with capacities of 3, 5, and 8, where jugs A and B start empty and C has the full 8, require 2 operations to reach the state of 0, 3, and 5 liters in the jugs.

Create a function that, given an array of jug capacities [A, B, C] and an goal state array [x, y, z], returns the minimum number of operations needed to reach the goal state. If the inputs are invalid or there is no solution, return "No solution." Probelm Link : https://edabit.com/challenge/BMujCYCkTowit85Wq Choose one Cateorgy - Expert question category : Algoritms, Conditions, Data_structures, Loops


Before submitting a PR please Check some details.

This repository is vaild for HacktoberFest2020

Read before making PR - How to contribute on Github Good Luck,

Jayshah6699 commented 4 years ago

@aayushi-droid Kindly assign me the task

Mostafa-ashraf19 commented 4 years ago

Hello, can I work on this issue for Hacktoberfest?

Jayshah6699 commented 4 years ago

@Mostafa-ashraf19 Why not? @aayushi-droid assign it to him as soon as possible

Jayshah6699 commented 4 years ago

@aayushi-droid add an expert label too

Mostafa-ashraf19 commented 4 years ago

@Jayshah6699 , @aayushi-droid I solved the problem, what can I do now, make a PR, or setting a solution here in the comments for review!!!

ashishrrs commented 4 years ago

I would love to work on it.Please assign me.

Jayshah6699 commented 4 years ago

@Jayshah6699 , @aayushi-droid I solved the problem, what can I do now, make a PR, or setting a solution here in the comments for review!!! @Mostafa-ashraf19 fork this repo then commit the code in specific folder in given criteria and then you will see pullrequest option there.

Mostafa-ashraf19 commented 4 years ago

@Jayshah6699, can you tell me your feedback please.

aayushi-droid commented 3 years ago

97 issue merged