Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Tracking minimum of values in an array over time

by tj_thompson (Monk)
on Oct 06, 2011 at 22:01 UTC ( #930072=note: print w/ replies, xml ) Need Help??


in reply to Re: Tracking minimum of values in an array over time
in thread Tracking minimum of values in an array over time

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!


Comment on Re^2: Tracking minimum of values in an array over time

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://930072]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (13)
As of 2014-09-19 13:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (138 votes), past polls