in reply to Challenge: Generate fixed size combination across groups without duplicates
#!/usr/bin/perl use strict; use warnings; use Math::Combinatorics; my(@aoa) = ( qw(A B C), qw(1 2 3 4), qw(yellow blue green), qw(tiny small medium large gigantic), ); my @n = combine(2, @aoa); print "[", join(", ", @$_), "]\n" for @n;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Challenge: Generate fixed size combination across groups without duplicates
by Limbic~Region (Chancellor) on Nov 17, 2011 at 03:07 UTC |