Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Mark Jason Dominus And Me - The Partition Problem

by Tommy (Chaplain)
on Nov 12, 2012 at 23:29 UTC ( [id://1003519]=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
    
    exit;
    
  2. or download this
    ->       Calls: 1     Depth: 1     Share: [  ]       Target: 5     Tre
    +asures: [ 50 2 4 3 1 2 4 8 ] ... Putting "50" into the share, leaving
    + treasures [ 2 4 3 1 2 4 8 ]
    
    ...
    A recursive call at depth 3 found that a solution of [ 2 3 ] adds up t
    +o my target of 5 at depth 2
    
    Solution: 2 3
    
  3. or download this
    #!/usr/bin/perl
    
    ...
       return $total;
    }
    
  4. or download this
    Looking for numbers that add up to target: 5...
    Adding up [ 2 + 4 ] = 6
    Adding up [ 2 + 3 ] = 5
    Solution: 2 3
    Calls: 4
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://1003519]
Approved by Athanasius
Front-paged by Athanasius
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-23 07:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found