Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Permutations in reverse order

by Khen1950fx (Canon)
on Mar 02, 2013 at 00:52 UTC ( #1021370=note: print w/ replies, xml ) Need Help??


in reply to Permutations in reverse order

Something like this? Warning: the resulting list of descending permutations will list every descending permutation, and it only stops when it returns to the original ascending list.

#!/usr/bin/perl -l use strict; use warnings; use Algorithm::Loops qw(NextPermute); my(@list) = (1..14); do { print join(",", reverse @list); } while( NextPermute(@list) );


Comment on Re: Permutations in reverse order
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (15)
As of 2015-07-28 19:58 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 (258 votes), past polls