es-collections
es-collections copied to clipboard
PriorityQueue API
Not content with add
, remove
Can't use deleteMin
or deleteMax
since we don't know if it's the min or max
Thought about deleteTop
- however, delete
returns a boolean of whether the item was in the collection - would this be confusing?
Also, the static functions newNaturalMin
and newNaturalMax
- should they be functions, or subclasses of PriorityQueue
- what would be a better name?