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
Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
Prev
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
HeapsGATEdoubt
https://gateoverflow.in/459/gate200847 here if we insert all elements together and then call heapify function then it’ll take O(logn) time. why answer is O(n)?
asked
Dec 4
in
Algorithms
by
aditi19
Active
(
2.1k
points)

24
views
heap
binaryheap
0
votes
1
answer
2
NIELIT Qtn
Consider there are n/logn min heap trees each of size logn. What will be the time complexity to find the smallest element and greatest element in these min heap trees respectively? A) O(n/logn), O(n) B) O(n), O(n/logn) C) O(n), O(n) D) O(logn), O(logn)
asked
Dec 2
in
Algorithms
by
pps121
Active
(
1.4k
points)

49
views
heap
0
votes
1
answer
3
Kth Largest element in MinHeap
What is the time complexity to find the Kth largest element in a MinHeap? Or equivalently, What is the time complexity to find Kth smallest element in MaxHeap?
asked
Dec 1
in
Algorithms
by
gmrishikumar
(
487
points)

58
views
algorithms
heap
binaryheap
timecomplexity
sorting
+1
vote
1
answer
4
MADEEASY DS
The minimum number of comparisons required to find the 65th smallest element in a minheap is equal to
asked
Nov 24
in
DS
by
Utkarsh Joshi
Active
(
5.1k
points)

154
views
madeeasytestseries
datastructure
heap
0
votes
0
answers
5
Max heap when stored in an array is always in sorted order
asked
Nov 15
in
DS
by
sripo
Junior
(
933
points)

84
views
sorting
binaryheap
arrays
heap
datastructure
algorithms
0
votes
1
answer
6
How to understand difference between n/2 and log(n) when comes to operations on a binary tree
asked
Nov 8
in
DS
by
sripo
Junior
(
933
points)

61
views
datastructure
binarytree
heap
binaryheap
0
votes
0
answers
7
Runtime Environment Heap Allocation
Does Heap Allocation support both recursion and dynamic memory allocation? Because,a stack can be implemented using dynamic memory allocation.Please correct me. Test Series answer shows only dynamic memory allocation
asked
Nov 3
in
Compiler Design
by
sripo
Junior
(
933
points)

72
views
compilerdesign
runtimeenvironments
operatingsystem
memorymanagement
heap
recursion
activationrecords
0
votes
0
answers
8
self doubt on heaps
$(1)$ In a binary heap with $'n'$ elements with the smallest element at the root, the $7th$ smallest element can be found in time? $A)\theta(nlogn)$ $B)\theta(n)$ $C)\theta(logn)$ $D)\theta(1)$ $(2)$ In binary max heap containing $'n'$ numbers, the smallest ... this heap. The total time required for this is? $A)\theta(logn)$ $B)\theta(n)$ $A)\theta(nlogn)$ $A)\theta(n^{2})$
asked
Nov 1
in
Algorithms
by
Lakshman Patel RJIT
Boss
(
20.8k
points)

113
views
algorithms
heap
0
votes
0
answers
9
Algorithm and data structure
https://gateoverflow.in/?qa=blob&qa_blobid=17275535249024428371
asked
Sep 10
in
Algorithms
by
manvi_agarwal
(
109
points)

46
views
datastructure
algorithms
heap
0
votes
0
answers
10
No. of comparison in min heap
What is the number of comparisons required to extract 45th element of the min heap?
asked
Sep 10
in
Algorithms
by
bts1jimin
(
119
points)

101
views
algorithms
heap
binaryheap
timecomplexity
0
votes
0
answers
11
# Binomial tree # Binomial Heap
What is Binomial tree please explain in easy words. Construct the Binomial heap for the following sequence of numbers 7,2,4,17,1,11,6,8,15,10,20. Also apply the operation of extracting the minimum key in the resulting binomial Heap.
asked
Sep 10
in
Algorithms
by
LavTheRawkstar
Active
(
5.2k
points)

50
views
algorithms
heap
sorting
datastructure
binomial
tree
btree
0
votes
0
answers
12
# 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.
asked
Sep 9
in
Algorithms
by
LavTheRawkstar
Active
(
5.2k
points)

40
views
algorithms
heap
heapsort
sorting
0
votes
0
answers
13
Heap Data Structure
How traversal in a heap takes place? Consider a min heap , I think we cannot traverse it like a binary tree ......For Example if we have to print all elements of heap Do we need to perform delete operation on root O(1) time then perform Heapify O(lgn) and again perform delete and so on which overall takes O(N) time ? Whether same is for search as well Plz explain...
asked
Aug 20
in
DS
by
Shiv Gaur
Active
(
1.4k
points)

42
views
heap
algorithms
timecomplexity
0
votes
0
answers
14
Heap Sorting
Consider a binary tree, where left and right subtreealready heapified. But we havenot done heapificationfor root yet. Then what is time complexity to convert it in a full heap tree? $A)O(\log n)$ or $o(n)$ $B)\Omega (\log n)$ or $\omega(n)$ $C)\Theta (\log n)$ or $\theta (n)$ $D)\text{None of these}$
asked
Aug 18
in
DS
by
srestha
Veteran
(
104k
points)

124
views
algorithms
sorting
heap
binaryheap
timecomplexity
0
votes
0
answers
15
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
Aug 16
in
DS
by
srestha
Veteran
(
104k
points)

57
views
heap
timecomplexity
datastructure
0
votes
1
answer
16
UGCNETJuly2018II22
Consider the array A=<4, 1, 3, 2, 16, 9, 10, 14, 8, 7>. After building heap from the array A, the depth of the heap and the right child of maxheap are ______ and _____ respectively (Root is at level 0). 3, 14 3, 10 4, 14 4, 10
asked
Jul 13
in
Others
by
Pooja Khatri
Active
(
5.1k
points)

222
views
ugcnetjuly2018ii
datastructure
heap
0
votes
0
answers
17
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
Junior
(
919
points)

81
views
heap
0
votes
0
answers
18
#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
(
9.3k
points)

87
views
algorithms
binaryheap
heap
datastructure
+2
votes
1
answer
19
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
(
104k
points)

239
views
heap
algorithms
binaryheap
datastructure
0
votes
1
answer
20
#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
(
9.3k
points)

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

55
views
heap
algorithms
binaryheap
0
votes
1
answer
22
#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
(
9.3k
points)

81
views
binaryheap
heap
+1
vote
1
answer
23
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
Loyal
(
6.3k
points)

55
views
heap
algorithms
0
votes
0
answers
24
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
(
4.3k
points)

34
views
heap
datastructure
+1
vote
1
answer
25
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
(
4.6k
points)

60
views
heap
0
votes
0
answers
26
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
(
81
points)

117
views
spacecomplexity
comlexity
algorithms
heap
heapsort
+1
vote
0
answers
27
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
(
4.3k
points)

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

126
views
algorithms
binaryheap
dijkstrasalgorithm
timecomplexity
heap
0
votes
1
answer
29
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.7k
points)

70
views
heap
algorithms
binaryheap
+2
votes
1
answer
30
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
(
4.3k
points)

255
views
heap
datastructure
Page:
1
2
3
4
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
[PSU FORM FILLING UPDATE]
IIT HYDERABAD M.Tech (RA) 3Years Winter Session Interview experience
INDIAN AIR FORCE
GATE BOOK _ TEST SERIES DOUBT_
Visualizing complex C code
Follow @csegate
Gatecse
Recent questions tagged heap
Recent Blog Comments
open the link and you will...
In
“PSU PERCENTAGE...
First of all, congratulations!
I can...
Congrats man. You wrote gate in B.Tech 3rd year?
Thank You so much sir for giving tips. I will...
44,337
questions
49,836
answers
164,750
comments
65,874
users