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)
how will we solvw this question?
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)
how will we solvw this question?