aayushi-droid / Python-Thunder

A curated list of Python applications
MIT License
86 stars 158 forks source link

Water Jug Problem #33

Closed Jayshah6699 closed 4 years ago

Jayshah6699 commented 4 years ago

Before jumping into Pr first comment for assign.All Problem from Edabit. Link is mandatory to add

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." Problem Link: https://edabit.com/challenge/BMujCYCkTowit85Wq


Before submitting a PR please Check some details.Check Edabit for problem task

This repository is vaild for HacktoberFest2020

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

ghost commented 4 years ago

Hey @Jayshah6699 I have worked on this statement in 3rd Semester in C++ I just how transform language and I think I will for Hacktober Fest! Please assign me!

aayushi-droid commented 4 years ago
Jayshah6699 commented 4 years ago

@aayushi-droid add also hard label

Jayshah6699 commented 4 years ago

Happy coding @smeet-kothari