In this strategy removes cost one unit but the cost of a


One way to delete nodes from a known position in a leftist heap is to use a lazy strategy. To delete a node, merely mark it deleted. When a findMin or deleteMin is performed, there is a potential problem if the root is marked deleted, since then the node has to be actually deleted and the real minimum needs to be found, which may involve deleting other marked nodes. In this strategy, removes cost one unit, but the cost of a deleteMin or findMin depends on the number of nodes that are marked deleted. Suppose that after a deleteMin or findMin there are fewer marked nodes than before the operation.

a.  Show how to perform the deleteMin in O(log N) time.

b. Propose an implementation, with an analysis to show that the time to perform the deleteMin is O(klog(2N/k)).

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: In this strategy removes cost one unit but the cost of a
Reference No:- TGS01274645

Expected delivery within 24 Hours