At a minimum, since heaps are usually implemented (with implicit references to node placement), the part that you seem to almost ignore ("with H1 and H2 attached as children") has linear complexity in itself.
As the heap is usually implemented, you have a linear collection (for example, an array), where each element of N has elements 2N and 2N + 1 as its elements (for example, with array 1, the children of element 1 are elements 2 and 3, and the children element 2 are 4 and 5). Therefore, you need to interleave the elements from two heaps before we move to the starting point for the merge operation.
If you started with explicitly linked binary trees (only after heap style rules, and not, for example, for binary tree searches), then you are right, the merger can be performed with logarithmic complexity - but I doubt this original article intends to refer to such Structure.
source share