Methods to change the minimum or maximum heap element

I think one of the future directions for Heap was to add methods that replace a heap's minimum or maximum element, pointing to a new element if the updated value no longer qualifies. I had to add a direct-state initializer to do my tests. And I had to make the invariant-testing code an unconditional method to create the initializer.

It's at: "[Heap] Change value of minimum or maximum element #116"

These additions look fine in concept, but I'd be very interested in seeing some motivational use cases for them!

Also, are there preexisting heap implementations (in other languages) that provide these operations?

1 Like
Terms of Service

Privacy Policy

Cookie Policy