• recategorized by
1,944 views
0 0 votes

A ) 

B ) 

C ) 

D ) 

2 Answers

4 4 votes

Answer will be max heap of size n.

We can access first max element from max heap in O(1). 

After that just delete k max element from heap and after every delete heapify the tree make sure it is max heap, which will take O(logn). 

So for K element time complexity will be O(klogn). And K is constant so O(logn).  

Position:
Show:

Related questions

2 2 votes
1 1 answer
1.2k
1.2k views
rasto mapp asked Jan 21, 2018
1,235 views
I think its none of the above?
0 0 votes
1 1 answer
4.1k
4.1k views
Overflow04 asked Jun 29, 2022
4,095 views
Someone please explain the login behind the explanation.
1 1 vote
1 1 answer
413
413 views
0 0 votes
0 0 answers
706
706 views
none30 asked Jun 11, 2023
706 views
What is the smallest and largest number of entries for 2-3 BTree (B2-3 Tree) of height 8 (i.e., 8 levels) ?255 and 6560127 and 2186 6561 and 255255 and 2186