algorithms icon indicating copy to clipboard operation
algorithms copied to clipboard

Add a priority queue / heap with max size

Open dblock opened this issue 14 years ago • 1 comments

It's a pretty common problem (and we have this problem :)) where you want a priority queue that "loses" items of lesser priority (has a max size). What do you think of extending heap?

dblock avatar Jan 27 '11 22:01 dblock

It's as simple as ad/delete(pop), but not very efficient.

dblock avatar Jan 27 '11 22:01 dblock