The Gateway to Computer Science Excellence
For all GATE CSE Questions
Toggle navigation
GATE Overflow
Facebook Login
Google Login
or
Email or Username
Password
Remember
Login
Register

I forgot my password
All Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous
Blogs
New Blog
Exams
First time here? Checkout the
FAQ
!
x
×
Close
Use the google search bar on side panel. It searches through all previous GATE/other questions. For hardcopy of previous year questions please see
here
Recent questions tagged heap
0
votes
0
answers
1
Heap data structure
a)Deletion of smallest element in heap b)Insertion of an element in a heap will take $O(n)$ or $O(logn)$ time?
asked
1 day
ago
in
DS
by
srestha
Veteran
(
91.8k
points)

26
views
heap
timecomplexity
datastructure
0
votes
0
answers
2
Heap Sort :
Q) 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 like this: (16 14 15 10 12 27 28 ) How many heapify operations have been performed on root of heap?
asked
Jul 8
in
Algorithms
by
pradeepchaudhary
(
179
points)

67
views
heap
0
votes
0
answers
3
#DS Inserting elements into Min Heap?
The number of distinct min heap are possible with keys 1, 2, 3, 4, 5 are ________. I know, there are variance of this question for Max heap and even for Min heap, the answer won't change, but I just wanna know if my technique is right or not. ===== ... any value. > Lastly the right sub tree => 1C1 = 1 Totally  1*4C3*1*2*1 = 8. Is this approach correct?
asked
Jun 24
in
DS
by
iarnav
Loyal
(
7.9k
points)

59
views
algorithms
binaryheap
heap
datastructure
+1
vote
0
answers
4
Heap DS
A min heap having 1024 distinct elements with keys ranging from 0 to 1023 is stored in array of 1024 indices. The maximum difference between element 512 present at maximum level and minimum level is ________. [Assume root is ... taking maximum level 11 and minimum level 2 __________________________________________________________________________ why minimum level 2, and why it is not 1?
asked
Jun 24
in
Programming
by
srestha
Veteran
(
91.8k
points)

71
views
heap
algorithms
binaryheap
datastructure
0
votes
1
answer
5
#DataStructure Heaps Self Doubt.
In a binary Heap of 100 elements time taken to find the 99th element? or in a binary heap on "n" elements, time taken to find (n1)th element? Note ; I'm not asking about smallest or largest, but simply the 99th element.
asked
Jun 21
in
DS
by
iarnav
Loyal
(
7.9k
points)

104
views
algorithms
heap
0
votes
1
answer
6
#Algorithms Can Heapsort be applied on Min Heap Data Structure?
asked
Jun 20
in
Algorithms
by
iarnav
Loyal
(
7.9k
points)

36
views
heap
algorithms
binaryheap
0
votes
1
answer
7
#Binary Max Heap Question (Doubt)
Let's say we're given with a MAX Heap and we want to delete any of the leaf node, then how much time will it take to delete any of the leaf node and maintain the max heap property? My main doubt is  will it O(n) time to reach to leaf nodes?
asked
Jun 19
in
DS
by
iarnav
Loyal
(
7.9k
points)

73
views
binaryheap
heap
+1
vote
1
answer
8
algorithm
Given two inputs bst and min heap tree with $n$ nodes .To get the sorted order which is better and how much time? In the solution for min heap they first used build heap to create min heap thenm usual $log n$ to take minimum but why they use build heap becz i think input is given as a min heap so have already min heap
asked
Jun 19
in
Algorithms
by
eyeamgj
Active
(
3.4k
points)

46
views
heap
algorithms
0
votes
0
answers
9
Heaps
What is the recurrence relation / math expression for the number of binary min heaps possible with "n" elements on which "k" elements are repeated "t" times where t=2 to n?
asked
Jun 17
in
DS
by
Balaji Jegan
Active
(
1.4k
points)

24
views
heap
datastructure
+1
vote
0
answers
10
GeeksForGeeks
Which data structure is most efficient to find the top 10 largest items out of 1 million items stored in file? A Min heap B Max heap C BST D Sorted array
asked
Jun 15
in
Algorithms
by
Rishav Kumar Singh
Active
(
2k
points)

28
views
heap
0
votes
0
answers
11
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 ?
asked
Jun 14
in
Algorithms
by
Hardik Maheshwari
(
59
points)

43
views
spacecomplexity
comlexity
algorithms
heap
heapsort
0
votes
0
answers
12
Number of Max Heap
How many maxheaps can be formed with the following elements? $\{1,1,1,2,2,2,3,3,3,4,4,4\}$
asked
Jun 4
in
DS
by
Balaji Jegan
Active
(
1.4k
points)

158
views
datastructure
permutationsandcombinations
binaryheap
heap
0
votes
1
answer
13
Dijkstra Time Complexity using Binary Heap
asked
May 22
in
Algorithms
by
iarnav
Loyal
(
7.9k
points)

62
views
algorithms
binaryheap
dijkstrasalgorithm
timecomplexity
heap
0
votes
1
answer
14
Fibnocii heap
what is Potential function in Fibonacci heap (i dont remember the question ) plz explain with example
asked
Mar 30
in
Algorithms
by
akshat sharma
Active
(
1.6k
points)

63
views
heap
algorithms
binaryheap
+2
votes
1
answer
15
Heaps
How many Binary MaxHeaps can be constructed from the elements {1,1,2,2,3,3,4,4} ?
asked
Mar 3
in
DS
by
Balaji Jegan
Active
(
1.4k
points)

233
views
heap
datastructure
0
votes
0
answers
16
Heap Smallest Element
My question is in Question like find 5th Smallest element in a heap: It requires O(logn) time if we do only Delete operation 5 Times.But what if the array contains no 5th smallest element say our array contain [1,1,1,1,1,1,1,1,1,1] now ... need to do extract min operation n number of times which would give nlogn time? Plz Clear my doubt https://gateoverflow.in/1110/gate200323
asked
Feb 17
in
Algorithms
by
Na462
Active
(
4.5k
points)

110
views
heap
binaryheap
algorithms
+2
votes
0
answers
17
Max Heap
asked
Jan 24
in
Programming
by
VS
Loyal
(
8.9k
points)

85
views
heap
datastructure
+4
votes
1
answer
18
Made easy cbt 2
Number of Max_heap possible ?
asked
Jan 23
in
DS
by
♥_Less
Active
(
1k
points)

329
views
madeeasytestseries
cbt2017
heap
+4
votes
2
answers
19
TEST SERIES
PLZ EXPLAIN?
asked
Jan 23
in
Algorithms
by
Abhi Girin
(
439
points)

138
views
algorithms
heap
+2
votes
0
answers
20
ace test
I think its none of the above?
asked
Jan 21
in
Algorithms
by
Deepak Mokili
(
307
points)

68
views
acetestseries
algorithms
heap
heapsort
+3
votes
2
answers
21
Datastructres
The number of distinct max heap are possible with keys 1, 2, 3, 4, 5 are ________.
asked
Jan 20
in
DS
by
MIRIYALA JEEVAN KUMA
Active
(
1.8k
points)

172
views
binaryheap
heap
algorithms
datastructure
+1
vote
0
answers
22
Test Series
How to solve such a problem?
asked
Dec 31, 2017
in
DS
by
Kalpataru Bose
(
367
points)

139
views
madeeasytestseries
algorithms
datastructure
heap
programminginc
arrays
+5
votes
0
answers
23
Min heap tree
Answer given : 1935360 but I m getting 3225600 please check..
asked
Dec 29, 2017
in
Programming
by
vamp_vaibhav
Active
(
3.3k
points)

121
views
min
heap
0
votes
1
answer
24
Heap Deletion
For searching an element from heap,then delete it from heap Why will it take O(n+log n) time and not O(n log n) time?
asked
Dec 8, 2017
in
Algorithms
by
srestha
Veteran
(
91.8k
points)

93
views
datastructure
heap
+1
vote
0
answers
25
Heaps
From an array of size n , we need to find the k bigger elements. What is the data structure we should use to find k bigger element in best asymptotic complexity? 1.A max heap of size n. 2. A max heap of size k. 3. A min heap of size n. 4.A min heap of size k.
asked
Dec 5, 2017
in
Algorithms
by
Warlock lord
Active
(
3.4k
points)

147
views
heap
algorithms
datastructure
0
votes
0
answers
26
[Algorithms] Heap sort
Merging k sorted lists of size n/k into one sorted list of nelements 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.
asked
Nov 27, 2017
in
Algorithms
by
rahul sharma 5
Boss
(
24.5k
points)

120
views
algorithms
timecomplexity
sorting
heap
+2
votes
0
answers
27
HEAP and its properties
Show that there are at most (n/2^h+1) nodes of height h in any nelement heap.
asked
Nov 10, 2017
in
Algorithms
by
ashwina
Active
(
2k
points)

74
views
algorithms
heap
+2
votes
0
answers
28
Worst case running time of MAX_HEAPIFY
Show that the worst case time complexity of MAX_HEAPIFY is Ω(logn ) .
asked
Nov 10, 2017
in
Algorithms
by
ashwina
Active
(
2k
points)

44
views
algorithms
heap
+1
vote
0
answers
29
Time Complexity of Max_heapify(A,i) (CLR 3rd edition Page no. 155)
asked
Nov 10, 2017
in
Algorithms
by
ashwina
Active
(
2k
points)

53
views
algorithms
heap
+4
votes
1
answer
30
Heap  Please explain first statement
asked
Nov 10, 2017
in
Algorithms
by
ankitgupta.1729
Loyal
(
6.6k
points)

98
views
heap
Page:
1
2
3
next »
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
Schedule for GATE 2019
GATE 2019 official website
Correct way of preparation
Right process to start solving MCQs in Comp.Sc.
UGC NET JULY 2018 Results
Follow @csegate
Gatecse
Recent questions tagged heap
Recent Blog Comments
Books are there but don't think any will leave ...
Sir i have placed the order Details are PAYMENT ...
Sir i am placing order for gate overflew book ...
Yes, their tracking system is incomplete. ...
India post don't update the tracking details. No ...
38,094
questions
45,586
answers
132,146
comments
49,110
users