Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^6: Challenge: N Jugs Problem

by ikegami (Patriarch)
on Apr 15, 2009 at 16:09 UTC ( [id://757712]=note: print w/replies, xml ) Need Help??


in reply to Re^5: Challenge: N Jugs Problem
in thread Challenge: N Jugs Problem

For comparison:

$ time perl min_supply.pl 1 4 3 Required supply: 3 6 steps: S->X X->Z S->X X->Z S->X X->Z real 0m0.011s user 0m0.016s sys 0m0.000s $ time perl min_steps.pl 1 4 3 3 steps: S->Y Y->Z Z->X real 0m0.011s user 0m0.008s sys 0m0.004s $ time perl -e1 real 0m0.002s user 0m0.000s sys 0m0.000s

Note that I got a different solution that yours for min steps, but it's has the same number of steps.

Update: I seemed to have imagined that you said yours was slow. Ignore this post.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://757712]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-24 02:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found