Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^2: Tracking minimum of values in an array over timeby tj_thompson (Monk) |
on Oct 06, 2011 at 22:01 UTC ( [id://930072]=note: print w/replies, xml ) | Need Help?? |
A min heap would be an excellent way to determine the min value of the set at any time. Good call. For my particular problem, since I'm actually interested in making certain that all elements have crossed the floor value (as pointed out by Ant above), I think counting the number of values that cross the floor as they are incremented is the smartest solution. Good thoughts Ambrus, thanks!
In Section
Seekers of Perl Wisdom
|
|