Let's assume that we want to merge two min-heaps implemented as arrays while the members are all distinct, what's the most efficient algorithm in terms of worst-case time to implement this merge ?
There's a good answer to the same case without 'distinction' condition , here : Algorithm for merging two max heaps?
But how does the distinction can help us to have a better running time algorithm ?