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

Turning A Problem Upside Down

by Limbic~Region (Chancellor)
on Aug 20, 2009 at 23:10 UTC ( [id://790206]=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $given = $ARGV[0];
    # ...
    ...
        }
        return 1;
    }
    
  2. or download this
    my $input = $ARGV[0];
    $input = str2val($input);
    ...
        my ($word, $val) = split /\t/;
        print "$word\n" if $is_subset{$input - $val};
    }
    
  3. or download this
    a = 1
    b = (a * max) + 1
    c = (b * max) + 1
    ...
    z = (y * max) + 1
    
  4. or download this
    sub str2val {
        my ($str) = @_;
    ...
        }
        return $str;
    }
    
  5. or download this
    my $input = $ARGV[0];
    my %is_subset = map {$_ => 1} powerset(split //, $input);
    ...
        # ...
        return map {join '', sort @$_} @subsets;
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-18 18:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found