https://github.com/mohit-s96/die-hard-3-jug-problem-solver
Illustrated general case solution for 2 jug problem from the action movie Die Hard 3
https://github.com/mohit-s96/die-hard-3-jug-problem-solver
css3 math-problems puzzle-solver recursive-algorithm vanilla-js
Last synced: about 2 months ago
JSON representation
Illustrated general case solution for 2 jug problem from the action movie Die Hard 3
- Host: GitHub
- URL: https://github.com/mohit-s96/die-hard-3-jug-problem-solver
- Owner: mohit-s96
- Created: 2020-08-23T23:18:07.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-24T20:41:23.000Z (over 4 years ago)
- Last Synced: 2025-02-08T21:45:49.559Z (3 months ago)
- Topics: css3, math-problems, puzzle-solver, recursive-algorithm, vanilla-js
- Language: JavaScript
- Homepage: https://msx47.github.io/die-hard-3-jug-problem-solver/
- Size: 82 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
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 :) ]
