retagged by
771 views

1 Answer

Best answer
2 votes
2 votes

yes all are correct!

In first case to find the kth largest element, do k-1 deletions from the max heap, so k-1 times max-heapify procedure will be called.

T.C (k-1)logn = O(klogn)

selected by

Related questions

0 votes
0 votes
2 answers
1
sh!va asked Feb 7, 2017
4,093 views
I. A heap is always nearly complete tree.II. Worst case complexity of heapify operation is O( log n)III. Worst case complexity of build heap operation is O( n log n)a. I ...
0 votes
0 votes
1 answer
2
saurav raghaw asked Dec 22, 2018
674 views
The time complexity of the most efficient algorithm to determine whether an arbitrary array of size ‘n’, is min-heap or not?(A) O(log n)(B) O(n)(C) O(n logn)(D) O(1)
1 votes
1 votes
1 answer
3
Avijit Shaw asked Dec 21, 2018
4,339 views
What is the time complexity of 'deleting any random node from a max or min heap'?
1 votes
1 votes
1 answer
4
gmrishikumar asked Dec 1, 2018
2,248 views
What is the time complexity to find the Kth largest element in a Min-Heap? Or equivalently, What is the time complexity to find Kth smallest element in Max-Heap?