The operation of increase-key or decrease-key is for updating a key within a max- or min-heap, respectively.
Why doesn't a max-heap have a decrease-key operation, and a min-heap a increase-key operation?
Software Engineering Stack Exchange is a question and answer site for professionals, academics, and students working within the systems development life cycle. It only takes a minute to sign up.Sign up to join this community
This have been discussed before here. To sum up, these operations can easily be implemented in
O(log(n)) but usually aren't provided because they have little interest from a pure algorithmic perspective.
On the contrary, decrease-key on a min heap have an existing
O(1) implementation in a Fibonacci Heap and has an application, for example in a Dijkstra path-finding.