in DS recategorized by
367 views
2 votes
2 votes

I think its none of the above?

in DS recategorized by
367 views

4 Comments

Given as C
0
0
Okay..since they said that the elements are not inserted one by one so we can think like all the elements are added together.
Heap uses array data structure right..so append those m elements after n elements.
Now total size of heap is m+n. Apply build heap on it.
You answer would have been correct if the elements were added one by one.
3
3
Got it now.Thnks :)
1
1

1 Answer

0 votes
0 votes
0(m+n)   not necessarily 1 after the other is given