The problem with implementing merge for binary heaps using a tree representation: Binary heaps are also leftist heaps, but the worst possible ones! The naive merging algorithm (discussed in lecture) used to merge leftists heaps might result in a right heavy tree. For example, consider merging two binary (min) heaps A and B, where the root of B is greater than all nodes in A. The resulting resulting tree A+B is very right heavy since B ends up at the rightmost end of A. And fixing completness of A+B can require upto O(total number of elements) time, which is the same as inserting all elements from one heap into another. Another option is to build a binary heap from sratch by converting both heaps to sequences, concatenating them, and calling buildHeap() on the final sequence, but this would also cost O(total number of elements)---which is also as bad as before.