figure merging leftist heaps notes program gives the code for the merge method of the leftistheap class the merge method makes use of two other methodsswapcontents and swapsubtrees the swapcontents method takes as its argument leftist heapand exchanges all the contents (key and subtreesof this heap with the given one the swapsubtrees method exchanges the left and right subtrees of this node the implementation of these routines is trivial and is left as project for the reader clearlythe worst-case running time for each of these routines is ( the merge method only visits nodes on the rightmost paths of the trees being merged suppose you are merging two treessay and with null path lengths and respectively then the running time of the merge method is ( ) (isgto( lovely professional university