Suppose that binary heaps are represented using explicit links. Consider the problem of merging binary heap lhs
Question:
a. Give an O(logN) algorithm to merge the two heaps if l = r.
b. Give an O(logN) 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.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Data Structures and Algorithm Analysis in Java
ISBN: 978-0132576277
3rd edition
Authors: Mark A. Weiss
Question Posted: