Don't you just love understatement :)
Aye, I'm very much in awe of his use of references in the solution. Would just never think to use uniq in that way.
I actually noticed another potential problem with your and my later solution. for my $i (0..$#array) doesn't recalculate the max value with each iteration. It isn't a problem given it does for the inner loop, but it could potentially lead to issues in a different algorithm, so glad I noticed this.
In reply to Re^4: how to find combine common elements of an array?
by wind
in thread how to find combine common elements of an array?
by ihperlbeg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |