0

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 ?

Community
  • 1
  • 1
Arian
  • 7,397
  • 21
  • 89
  • 177
  • Question is edited now – Arian Apr 17 '13 at 23:38
  • I've reworded this question to remove the word "unsorted." I think that this ends up being more confusing than was intended. It's not that the elements are unsorted as much as they're ordered as a min-heap, which are two totally different conditions. – templatetypedef Apr 17 '13 at 23:43

0 Answers0