Combinations: Difference between revisions

Add trivial perl version with perl module.
m (Spelling/grammar/aesthetics.)
(Add trivial perl version with perl module.)
Line 53:
 
The <tt>M.</tt> uses memoization which greatly reduces the running time.
 
=={{header|Perl}}==
{{library|Math::Combinatorics}}
use Math::Combinatorics;
@n = (0 .. 4);
print join("\n", map { join(" ", @{$_}) } combine(3, @n)), "\n";
Anonymous user