Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Getting permutations of length n of an array of length greater than n?

by choroba (Archbishop)
on Jan 18, 2022 at 22:08 UTC ( #11140590=note: print w/replies, xml ) Need Help??


in reply to Getting permutations of length n of an array of length greater than n?

Instead of Algorithm::Permute, try Math::Combinatorics or Algorithm::Combinatorics.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
  • Comment on Re: Getting permutations of length n of an array of length greater than n?
  • Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2022-05-27 07:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (94 votes). Check out past polls.

    Notices?