in reply to How can one generate all possible permutations of r elements out of n where r<n?
C:\test>perl -MAlgorithm::Combinatorics=variations -E"$i=variations( [ +'A'..'D'], 3 ); say @$_ while $_= $i->next" ABC ABD ACB ACD ADB ADC BAC BAD BCA BCD BDA BDC CAB CAD CBA CBD CDA CDB DAB DAC DBA DBC DCA DCB
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How can one generate all possible permutations of r elements out of n where r<n?
by supriyoch_2008 (Monk) on Feb 27, 2013 at 09:11 UTC | |
by marto (Cardinal) on Feb 27, 2013 at 09:21 UTC |