The stupid question is the question not asked | |
PerlMonks |
Re^5: Out of Memory when generating large matrixby Anonymous Monk |
on Mar 06, 2018 at 14:17 UTC ( [id://1210406]=note: print w/replies, xml ) | Need Help?? |
It was supposed to mean that a count is obtained for each of the (unique) element in a set. (Not the number of unique elements.) It doesn't really matter though, what is important is that a set on unique elements has to be constructed. Constructing a set of unique elements is the same (algorithmically) as sorting, with the proviso that an ordered comparison function is available (i.e. set can be ordered). If only compare for equality is available, the construction becomes O(n*n).
In Section
Seekers of Perl Wisdom
|
|