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
In reply to Re: How can one generate all possible permutations of r elements out of n where r<n?
by BrowserUk
in thread How can one generate all possible permutations of r elements out of n where r<n?
by supriyoch_2008
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |