Q2. Merge Max-Heaps
In what best time complexity you can merge two max-heaps? (Assume size of first heap is (m+n) and the second is (n))
O(1)
O(m+n)
O(logM*logN)
O(mn)
what will be its answer and why
Q2. Merge Max-Heaps
In what best time complexity you can merge two max-heaps? (Assume size of first heap is (m+n) and the second is (n))
O(1)
O(m+n)
O(logM*logN)
O(mn)
what will be its answer and why