You have 3 jugs with capacities [8,5,3]. The 8L jug, the others are empty: [8,0,0]. There is no tap and no drain. You can only pour water between jugs. Find the minimum steps to get exactly [4,4,0].
  • Input: caps, initial, target
  • Output: steps

Solution Stats

3 Solutions

3 Solvers

Last Solution submitted on Feb 19, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers3

Suggested Problems

More from this Author9

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!