Decreases the key value of a heap element by a specified amount. The element is rebalanced in whichever direction the new key requires, so a negative amount is handled the same as a positive one.
The type of max-heap array.
The max-heap instance.
The element to modify.
Amount to decrease the key by.
true if element was found and modified, false otherwise.
true
false
Decreases the key value of a heap element by a specified amount. The element is rebalanced in whichever direction the new key requires, so a negative amount is handled the same as a positive one.