When you call decrease-key in a min priority queue, you are basically setting the key, you can accidentally put a higher key, right? so why isn't it called set-key or update-key? why (according to Wikipedia and other sources) a min priority queue has decrease-key and a max priority queue has increase-key? why not have both set-key and if you decrease it or increase it, do what you should do to keep the heap property invariant? I mean what if I call decrease-key on a min heap and give a bigger value? Will it throw an exception? Why not just call it set-key and handle any kind of value?
Why in a min priority queue (heap based) it is called decrease-key and not just set-key?
terminology;data structures;priority queues