I have got an assignment to edit a priority-queue and implement (among other things) a insert function. Allthough my book mentions “lazy delete” and other lazy-actions it never specifies what “lazy” actually means.
In short:
What is the difference between insert/delete-functions and LAZY insert/delete-functions?
“Lazy delete” usually means you mark something deleted instead of deleting it directly, and modify other operations to pretend the marked items aren’t there.
In the case of a priority queue for example you could jump over the deleted items in the dequeue procedure instead of actively removing them from the middle, which is harder.
Similarly a “lazy insert” might add elements into an input queue, which is a constant-time operation. Normally an insertion into a priority queue takes O(log n) time. The input queue would be flushed into the priority queue when trying to dequeue. This would have the effect of off-loading the cost of the insert operation until the dequeue operation.
Basically “lazy” means not doing an operation until its results are needed.