Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Shortest string containing all from 0000 to 9999 challenge.

by sauoq (Abbot)
on May 22, 2003 at 10:23 UTC ( #260021=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
       for ( 0 .. 9999 ) {
            my $k = 0 x ( 4 - length $_ ) . $_;
    
  2. or download this
    sub analyze {
        my $number = shift;
    ...
        my $missing = 10000 - keys %seen;
        return ($length, $missing, $duplicates)
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://260021]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2018-04-19 15:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?