Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Search results for heap-sort
113
votes
8
answers
1
GATE CSE 2013 | Question: 30
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)$
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)...
Arjun
27.9k
views
Arjun
asked
Sep 24, 2014
Algorithms
gatecse-2013
algorithms
sorting
normal
heap-sort
+
–
0
votes
1
answer
2
ISRO 2024
Worst case time complexity of heap sort for n elements O(nlogn) O(logn) O^2 O(n)
Worst case time complexity of heap sort for n elementsO(nlogn)O(logn)O^2O(n)
Ramayya
176
views
Ramayya
asked
Jan 7
Algorithms
isro-2024
algorithms
heap-sort
sorting
+
–
0
votes
2
answers
3
made easy test series for gate cse 2023
please help me out in solving this question. the solution provided there is not upto the mark
please help me out in solving this question. the solution provided there is not upto the mark
sachidanand_dwivedi
1.1k
views
sachidanand_dwivedi
asked
Dec 21, 2022
Programming in C
data-structures
heap-sort
heap
difficult
made-easy-test-series
+
–
2
votes
4
answers
4
GATE Overflow | Algorithms | Test 1 | Question: 19
Is an array that is sorted in decreasing order a max-heap? always yes always no sometimes only yes but not in presence of duplicates
Is an array that is sorted in decreasing order a max-heap?always yesalways nosometimes onlyyes but not in presence of duplicates
Bikram
595
views
Bikram
asked
Oct 4, 2016
Algorithms
go-alogrithms-1
algorithms
sorting
heap-sort
+
–
1
votes
2
answers
5
Gate Applied Practice Test
Question--> The time required to find the 99th smallest element from a min heap of n elements is (given that we have access to the array elements)
Question The time required to find the 99th smallest element from a min heap of n elements is (given that we have access to the array elements)
lalitver10
1.0k
views
lalitver10
asked
Jan 13, 2022
Programming in C
binary-heap
data-structures
heap-sort
time-complexity
+
–
1
votes
3
answers
6
The recurrence relation for MAX-HEAPIFY function of heapsort algorithm is T(n) <= T(2n/3) + O(1). How is it 2n/3 ?
Vivek Jain
11.0k
views
Vivek Jain
asked
Apr 20, 2016
Algorithms
algorithms
time-complexity
recurrence-relation
heap-sort
binary-heap
+
–
1
votes
3
answers
7
Self doubt
You are asked to sort 15 randomly generated numbers. One should prefer— (a) Bubble sort (b) Quick sort (c) Merge sort (d) Heap sort I think the answer should be c or d crct me???
You are asked to sort 15 randomly generated numbers. One should prefer—(a) Bubble sort (b) Quick sort (c) Merge sort (d) Heap sortI think the answer should be c or d cr...
Shubhanshu
1.6k
views
Shubhanshu
asked
Jun 6, 2017
Algorithms
algorithms
sorting
merge-sort
heap-sort
+
–
1
votes
3
answers
8
[Algorithms] Heap sort
Merging k sorted lists of size n/k into one sorted list of n-elements using heap sort will take how much time ? My doubt First approach:- here it is mentioned heap sort so, heap sort will always take nlogn.and here also we have n elements and it will ... give o(k)+(logk)*(n/k) I think answer should be nlogn only because the second approach is not heap sort. Please check.
Merging k sorted lists of size n/k into one sorted list of n-elements using heap sort will take how much time ?My doubtFirst approach:- here it is mentioned heap sort so,...
rahul sharma 5
1.1k
views
rahul sharma 5
asked
Nov 27, 2017
Algorithms
algorithms
heap-sort
time-complexity
+
–
1
votes
3
answers
9
Heapsort Comparisons
How many element comparisons would heap sort use to sort the integers $1$ to $8$ if they were initially in sorted order, initially in reverse sorted order?
How many element comparisons would heap sort use to sort the integers $1$ to $8$ if they wereinitially in sorted order, initially in reverse sorted order?
Balaji Jegan
3.4k
views
Balaji Jegan
asked
Jun 17, 2018
DS
data-structures
heap-sort
+
–
1
votes
1
answer
10
UGC NET CSE | December 2004 | Part 2 | Question: 25
How much extra space is used by heapsort ? $O (1)$ $O (\log n)$ $O (n)$ $O (n^2)$
How much extra space is used by heapsort ?$O (1)$$O (\log n)$$O (n)$$O (n^2)$
go_editor
626
views
go_editor
asked
Mar 26, 2020
Algorithms
algorithms
heap-sort
ugcnetcse-dec2004-paper2
+
–
2
votes
1
answer
11
WHICH SORTING TO SELECT?
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— (a) Bubble sort (b) Insertion sort (c) Selection sort (d) Heap sort
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...
deepak mahapatra
16.8k
views
deepak mahapatra
asked
Jan 19, 2017
Algorithms
sorting
heap-sort
+
–
0
votes
1
answer
12
Space Complexity of Build Max Heap
Since Heapify is a recursive function, its space complexity is $O(logn)$ because of the stack space required for recursion. I also read that space complexity of heapsort is $O(1)$ beause of the explanation here - https://gateoverflow.in/79909/ ... complexity of build heap is $O(logn)$ then heapsorts complexity should also be the same . What am I missing here ?
Since Heapify is a recursive function, its space complexity is $O(logn)$ because of the stack space required for recursion.I also read that space complexity of heapsort i...
Hardik Maheshwari
4.7k
views
Hardik Maheshwari
asked
Jun 14, 2018
Algorithms
space-complexity
algorithms
binary-heap
heap-sort
+
–
0
votes
0
answers
13
Cormen Edition 3 Exercise 6.4 Question 1 (Page No. 160)
HEAPSORT(A) 1 BUILD-MAX-HEAP(A) 2 for i = A.length down to 2 3 exchange A[1] with A[i] 4 A.heapsize=A.heapsize – 1 5 MAX-HEAPIFY(A,1) illustrate the operation of HEAPSORT on the array $A=\langle 5,13,2,25,7,17,20,8,4 \rangle$
HEAPSORT(A) 1 BUILD-MAX-HEAP(A) 2 for i = A.length down to 2 3 exchange A with A[i] 4 A.heapsize=A.heapsize – 1 5 MAX-HEAPIFY(A,1)illustrate the operation of HEAPSORT ...
akash.dinkar12
331
views
akash.dinkar12
asked
Jun 27, 2019
Algorithms
cormen
algorithms
binary-heap
heap-sort
descriptive
+
–
0
votes
0
answers
14
Cormen Edition 3 Exercise 6.4 Question 4 (Page No. 160)
Show that the worst-case running time of HEAPSORT is $\Omega(n\lg\ n)$.
Show that the worst-case running time of HEAPSORT is $\Omega(n\lg\ n)$.
akash.dinkar12
311
views
akash.dinkar12
asked
Jun 27, 2019
Algorithms
cormen
algorithms
binary-heap
heap-sort
descriptive
+
–
0
votes
0
answers
15
Cormen Edition 3 Exercise 6.4 Question 2 (Page No. 160)
Argue the correctness of HEAPSORT using the following loop invariant: At the start of each iteration of the for loop of lines $2–5$,the subarray $A[1..i]$ is a max-heap containing the $i$ smallest elements of $A[1..n] $, and the subarray $A[i+1..n]$ contains the $n- i$ largest elements of $A[1..n]$, sorted.
Argue the correctness of HEAPSORT using the following loop invariant:At the start of each iteration of the for loop of lines $2–5$,the subarray $A[1..i]$ is a max-heap ...
akash.dinkar12
360
views
akash.dinkar12
asked
Jun 27, 2019
Algorithms
cormen
algorithms
binary-heap
heap-sort
descriptive
+
–
0
votes
0
answers
16
Cormen Edition 3 Exercise 6.4 Question 5 (Page No. 161)
Show that when all elements are distinct, the best-case running time of HEAPSORT is $\Omega(n\lg\ n)$.
Show that when all elements are distinct, the best-case running time of HEAPSORT is $\Omega(n\lg\ n)$.
akash.dinkar12
307
views
akash.dinkar12
asked
Jun 27, 2019
Algorithms
cormen
algorithms
binary-heap
heap-sort
descriptive
difficult
+
–
0
votes
0
answers
17
Cormen Edition 3 Exercise 6.4 Question 3 (Page No. 160)
What is the running time of HEAPSORT on an array $A$ of length $n$ that is already sorted in increasing order? What about decreasing order?
What is the running time of HEAPSORT on an array $A$ of length $n$ that is already sorted in increasing order? What about decreasing order?
akash.dinkar12
255
views
akash.dinkar12
asked
Jun 27, 2019
Algorithms
cormen
algorithms
binary-heap
heap-sort
descriptive
+
–
0
votes
1
answer
18
Sorting:
You have to sort 1 GB of data with only 100 MB of available main memory. Which sorting technique will be most appropriate? 1)QuickSort 2)MergeSort 3)HeapSort 4)Selection Sort Explain? How
You have to sort 1 GB of data with only 100 MB of available main memory. Which sorting technique will be most appropriate?1)QuickSort2)MergeSort3)HeapSort4)Selection Sort...
pradeepchaudhary
3.3k
views
pradeepchaudhary
asked
Jul 8, 2018
Algorithms
sorting
algorithms
time-complexity
heap-sort
+
–
1
votes
0
answers
19
Ace Test Series: Algorithm - Heap Sort
Q : What is the running time of heap sort for presorted input of size n? O(n) B) O(n^2) C) O(nlogn) D) O(logn) In the question they didn't mention if its a max or min heap and also they didn't mention if the presorted ... the time complexity would be O(n) and for decresing order it would be O(nlogn). Is the question incomplete or am i missing some concepts?
Q : What is the running time of heap sort for presorted input of size n?O(n) B) O(n^2) C) O(nlogn) D) O(logn)In the question t...
OneZero
1.0k
views
OneZero
asked
Dec 24, 2018
Algorithms
ace-test-series
heap-sort
algorithms
+
–
1
votes
1
answer
20
# Heap sort
Sort The Following Sequence of input using Heap sort. { 10 , 2 , 1 , 5, 3 ,8 ,11,24 ,7 } Please show the output at every pass because i am getting confused.
Sort The Following Sequence of input using Heap sort.{ 10 , 2 , 1 , 5, 3 ,8 ,11,24 ,7 }Please show the output at every pass because i am getting confused.
LavTheRawkstar
1.0k
views
LavTheRawkstar
asked
Sep 9, 2018
Algorithms
algorithms
binary-heap
heap-sort
sorting
+
–
Page:
1
2
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register