Question: 1. [Heap, 15 pts| Write a method in pseudocode or java that takes two heaps as inputs and outputs a heap that contain all elements

1. [Heap, 15 pts| Write a method in pseudocode or java that takes two heaps as inputs and outputs a heap that contain all elements of the two given heaps. The heaps are given in a linked-list representation. The time complexity of your method should be O(log(m+n), where m and n are number of nodes in the two inputs heaps. Your method should be called public MergeHeap(Heap h, Heap g)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
