Recent questions tagged heap-sort

1 1 vote
1 1 answer
3.1k
3.1k views
1) Show that when all elements are distinct, the best case running time of HEAPSORT is Ω(n log n).2) Show that the worst case running time of HEAPSORT is Ω(n log n).
2 2 votes
1 answers 1 answer
1.3k
1.3k views
What is the worst case time complexity of finding a element in max heap tree ?Explain.
1 1 vote
2 2 answers
1.5k
1.5k views
what is the time complexity of finding a number in a heap sort in worst case & what is the time complexity for deleting the element from heap?
2 2 votes
1 1 answer
17.5k
17.5k views
As part of maintenance work, you are entrusted with the work of rearranging the library books in a shelf in proper order, at the end of each day. The ideal choice will be...
0 0 votes
2 2 answers
847
847 views
Consider the following two statementsP: There exists a comparison sort of 5 numbers that uses at most 6 comparisons in worst case.Q: Heap sort can be used as the auxiliar...
1 1 vote
0 0 answers
935
935 views
Need approach to solve this ?
0 0 votes
1 1 answer
1.3k
1.3k views
Why is space complexity of heap sort is O(1)? Everytime it calls Heapify() function at the root node of the heap and heapify in the worst case takes O(log n) space. Then ...
2 2 votes
2 answers 2 answers
2.6k
2.6k views
Meena is working in an IT company as HR manager. She has a large list of potential candidates to be recruited which are all sorted by their names. But she found that due ...
7 7 votes
1 1 answer
5.2k
5.2k views
Suppose we are sorting an array of eight integers using heapsort, and we have just finished some heapify (either maxheapify or minheapify) operations. The array now looks...
1 1 vote
1 answers 1 answer
2.0k
2.0k views
There are 3 D&C basis sorting AlgosQuick sort :- T(k)+T(n-k)+ CnMerge sort :- 2T(n/2) +Cn Heap sort :- ___________I know how the complexity of heap sort is O(nlogn) but ...
0 0 votes
1 1 answer
652
652 views
Merging K sorted list each of size n/k into one sorted list of n-elements using Heap Sort will take how much time?
2 2 votes
4 answers 4 answers
1.5k
1.5k views
Is an array that is sorted in decreasing order a max-heap?always yesalways nosometimes onlyyes but not in presence of duplicates
1 1 vote
1 1 answer
1.2k
1.2k views
The number of elements that can be sorted in time using heap sort ?
1 1 vote
0 0 answers
661
661 views
Why is the space complexity of heap sort O(1) and not O(log n) even if Heap sort internally calls max_heapify whose space complexity is O(log n) due to the stack (recursi...
2 2 votes
1 answers 1 answer
2.4k
2.4k views
The time complexity to build a heap with a list of n numbers isO(log n)O(n)O(n logn)O(n$^2$)
1 1 vote
1 answers 1 answer
2.3k
2.3k views
K sorted lists of n/k elements each. What is time complexity to sort them?please specifiy ur ans in detail
0 0 votes
3 answers 3 answers
1.1k
1.1k views
4) The number of elements that can be sorted in Θ(logn) time using heap sort is (A) Θ(1)(B) Θ(sqrt(logn))(C) Θ(Log n/(Log Log n))(d) Θ(Log n)
1 1 vote
1 answers 1 answer
1.8k
1.8k views
What is the Best Case run time of Heap Sort ?A. $O(1)$B. $O(n)$C. $O(n \log n)$D. $O(\log n)$
0 0 votes
1 1 answer
770
770 views
statement is true or falseHeap sort is inplace algorithm. it is given as truebut heapsort uses maxheapify procedure which requires extra stack ., then how it is inplac...
159 159 votes
11 answers 11 answers
43.6k
43.6k views
The number of elements that can be sorted in $\Theta(\log n)$ time using heap sort is$\Theta(1)$$\Theta(\sqrt{\log} n)$$\Theta(\frac{\log n}{\log \log n})$$\Theta(\log n)...