Write an efficient algorithm for combining two heaps one


Consider the problem of combining two heaps together into a single heap.

a. Write an efficient algorithm for combining two heaps, one with size n and the other with size 1. What is the Big Oh performance of your algorithm?

b. Write an efficient algorithm for combining two heaps of equal size n. What is the Big Oh performance of your algorithm?

c. Write an efficient algorithm for combining two arbitrary sized heaps into one heap. What is the Big Oh performance of your algorithm?

d. Implement the algorithm that you wrote in Part c.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Write an efficient algorithm for combining two heaps one
Reference No:- TGS02196144

Expected delivery within 24 Hours