Skip to content

mohit-s96/die-hard-3-jug-problem-solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2 Bucket Problem Solver Problem Statement : Suppose you have a "p" liter bucket and a "q" liter bucket. There is no other conatainer and neither do the buckets have measurement lines on them. How could you measure exactly "r" liters using only those buckets and you have as much extra water as you need ?

Rule 1 : p > q Rule 2 : p > r Rule 3 : r mod gcd(p, q) = 0

[NOTE : The rule enforcing is done by the program so you don't have to calculate it yourself :) ]

GitHub Logo

About

Illustrated general case solution for 2 jug problem from the action movie Die Hard 3

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published