lipong has asked for the wisdom of the Perl Monks concerning the following question:
Hi
Could someone please help me solve the following situation:
I have an array with the following pairs:
@pairs = ("1,7","2,6","2,7","5,4","6,7");
I would like to be able to have the following results:
"1,7","2,6","2,7","6,7"
This result because 1,7 overlap with 2,7 and 6,7 but also because the 6,7 joined the group also the 2,6 must be included.
The only pair that does not have nay overlap is "5,4" and should be put in a different group.
Thank you very much.
Any help would be much appreciated.
Thank you very much.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: results from pairs combination
by jdporter (Paladin) on Oct 01, 2008 at 17:41 UTC | |
by JadeNB (Chaplain) on Oct 01, 2008 at 22:34 UTC | |
by jdporter (Paladin) on Oct 01, 2008 at 22:46 UTC | |
by JadeNB (Chaplain) on Oct 01, 2008 at 22:54 UTC | |
by jdporter (Paladin) on Oct 02, 2008 at 14:33 UTC | |
Re: results from pairs combination
by moritz (Cardinal) on Oct 01, 2008 at 17:05 UTC | |
by lipong (Initiate) on Oct 01, 2008 at 17:16 UTC | |
Re: results from pairs combination
by suaveant (Parson) on Oct 01, 2008 at 17:33 UTC | |
by moritz (Cardinal) on Oct 01, 2008 at 17:40 UTC | |
Re: results from pairs combination
by Animator (Hermit) on Oct 01, 2008 at 18:00 UTC | |
by lipong (Initiate) on Oct 02, 2008 at 12:45 UTC | |
by Animator (Hermit) on Oct 02, 2008 at 20:18 UTC | |
by toolic (Bishop) on Oct 02, 2008 at 20:49 UTC | |
Re: results from pairs combination
by AnomalousMonk (Archbishop) on Oct 02, 2008 at 00:27 UTC |
Back to
Seekers of Perl Wisdom