Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Mark Jason Dominus And Me - The Partition Problem

by Tommy (Chaplain)
on Nov 12, 2012 at 23:29 UTC ( #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
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? | Other CB clients
Other Users?
Others imbibing at the Monastery: (20)
As of 2015-07-07 21:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls