A give an olog n algorithm to merge the two heaps if l


Suppose that binary heaps are represented using explicit links. Consider the prob- lem of merging binary heap lhs with rhs. Assume both heaps are perfect binary trees, containing 2l - 1 and 2r - 1 nodes, respectively.

a. Give an O(log N) algorithm to merge the two heaps if l = r.

b. Give an O(log N) algorithm to merge the two heaps if |l - r|= 1.

c. Give an O(log2 N) algorithm to merge the two heaps regardless of l and r.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: A give an olog n algorithm to merge the two heaps if l
Reference No:- TGS01274642

Expected delivery within 24 Hours