The Gateway to Computer Science Excellence
For all GATE CSE Questions
Toggle navigation
GATE Overflow
Facebook 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
+1
vote
0
answers
1
Cormen Edition 3 Exercise 6.1 Question 7 (Page No. 154)
Show that, with the array representation for storing an $n$element heap, the leaves are the nodes indexed by $\lfloor n/2\rfloor +1$,$\lfloor n/2\rfloor +2,…,n$
asked
Apr 5
in
Algorithms
by
akash.dinkar12
Boss
(
39.1k
points)

15
views
cormen
algorithms
heap
descriptive
0
votes
1
answer
2
Cormen Edition 3 Exercise 6.1 Question 6 (Page No. 154)
Is the array with values $23,17,14; 6,13,10,1,5,7,12$ a maxheap ?
asked
Apr 5
in
Algorithms
by
akash.dinkar12
Boss
(
39.1k
points)

18
views
cormen
algorithms
heap
descriptive
0
votes
1
answer
3
Cormen Edition 3 Exercise 6.1 Question 5 (Page No. 154)
Is an array that is in sorted order a minheap ?
asked
Apr 5
in
Algorithms
by
akash.dinkar12
Boss
(
39.1k
points)

17
views
cormen
algorithms
heap
0
votes
0
answers
4
Cormen Edition 3 Exercise 6.1 Question 4 (Page No. 154)
Where in a maxheap might the smallest element reside, assuming that all elements are distinct ?
asked
Apr 5
in
Algorithms
by
akash.dinkar12
Boss
(
39.1k
points)

21
views
cormen
algorithms
sorting
heap
descriptive
0
votes
0
answers
5
Cormen Edition 3 Exercise 6.1 Question 3 (Page No. 153)
Show that in any subtree of a maxheap, the root of the subtree contains the largest value occurring anywhere in that subtree.
asked
Apr 5
in
Algorithms
by
akash.dinkar12
Boss
(
39.1k
points)

9
views
cormen
algorithms
heap
descriptive
0
votes
0
answers
6
Cormen Edition 3 Exercise 6.1 Question 2 (Page No. 153)
Show that an $n$element heap has height $\lfloor lg\ n \rfloor$.
asked
Apr 5
in
Algorithms
by
akash.dinkar12
Boss
(
39.1k
points)

18
views
cormen
algorithms
heap
descriptive
0
votes
0
answers
7
Cormen Edition 3 Exercise 6.1 Question 1 (Page No. 153)
What are the minimum and maximum numbers of elements in a heap of height $h$?
asked
Apr 5
in
Algorithms
by
akash.dinkar12
Boss
(
39.1k
points)

9
views
cormen
algorithms
heap
descriptive
0
votes
3
answers
8
GATE201940
Consider the following statements: The smallest element in a maxheap is always at a leaf node The second largest element in a maxheap is always a child of a root node A maxheap can be constructed from a binary search tree in $\theta(n)$ time A binary search tree can be ... time Which of te above statements are TRUE? I, II and III I, II and IV I, III and IV II, III and IV
asked
Feb 7
in
DS
by
Arjun
Veteran
(
395k
points)

2k
views
gate2019
datastructure
heap
0
votes
0
answers
9
Finding the minimum element in a Heap
I was going through the heap concept and one question came into my mind what will be the best case time complexity of finding the minimum element in a max heap? Thank you:)
asked
Jan 15
in
DS
by
Nandkishor3939
Active
(
1.2k
points)

134
views
heap
binaryheap
timecomplexity
0
votes
0
answers
10
Madeeasy Max Heap 2019
Please explain the logic behind this shortcut and when to be used?
asked
Jan 13
in
Algorithms
by
Markzuck
Junior
(
643
points)

215
views
heap
datastructure
binaryheap
algorithms
madeeasytestseries
+2
votes
1
answer
11
HEAP (MAX/MIN HEAP)
what is the time complexity of various problems such as: 1) Creating the heap 2) Getting maximum element in the max heap 3) Getting minimum element in the max heap 4) Getting maximum element in min heap 5) Getting minimum element in min heap 6) Heapify the ... of an element in the max heap 10) Insertion of an element in the max heap 11) Insertion of an element in min heap
asked
Jan 1
in
Programming
by
Hira Thakur
Boss
(
13.9k
points)

57
views
heap
datastructure
+1
vote
1
answer
12
Deleting a random node from Heap
What is the time complexity of 'deleting any random node from a max or min heap'?
asked
Dec 21, 2018
in
DS
by
Avijit Shaw
(
145
points)

137
views
heap
binaryheap
timecomplexity
datastructure
0
votes
0
answers
13
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, 2018
in
Algorithms
by
aditi19
Active
(
2.9k
points)

35
views
heap
binaryheap
0
votes
1
answer
14
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, 2018
in
Algorithms
by
pps121
Active
(
1.6k
points)

61
views
heap
0
votes
1
answer
15
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, 2018
in
Algorithms
by
gmrishikumar
Active
(
1.8k
points)

170
views
algorithms
heap
binaryheap
timecomplexity
sorting
+2
votes
1
answer
16
MadeEasy Subject Test 2019: Programming & DS  Heap
The minimum number of comparisons required to find the 65th smallest element in a minheap is equal to
asked
Nov 24, 2018
in
DS
by
Utkarsh Joshi
Loyal
(
7.4k
points)

395
views
madeeasytestseries
datastructure
heap
0
votes
0
answers
17
Max heap when stored in an array is always in sorted order
This question is in CLRS,if we have a max heap it is always in sorted order(descending) order.And by extension if we have min heap the array is sorted in ascending order.Is this true? I have a counter example for ... it an heapified representation or not? If we heapify after deletion and store max deleted element then we get sorted array.
asked
Nov 15, 2018
in
DS
by
sripo
Active
(
2.6k
points)

135
views
sorting
binaryheap
arrays
heap
datastructure
algorithms
0
votes
1
answer
18
How to understand difference between n/2 and log(n) when comes to operations on a binary tree
asked
Nov 8, 2018
in
DS
by
sripo
Active
(
2.6k
points)

78
views
datastructure
binarytree
heap
binaryheap
0
votes
1
answer
19
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, 2018
in
Compiler Design
by
sripo
Active
(
2.6k
points)

122
views
compilerdesign
runtimeenvironments
operatingsystem
memorymanagement
heap
recursion
activationrecords
0
votes
0
answers
20
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, 2018
in
Algorithms
by
Lakshman Patel RJIT
Boss
(
34.3k
points)

134
views
algorithms
heap
+1
vote
0
answers
21
MadeEasy Test Series: Programming & DS  Heap
The minimum no. of comparison required to find 65 th smallest element in min heap is
asked
Oct 13, 2018
in
Algorithms
by
Aman Juyal
Junior
(
939
points)

176
views
datastructure
heap
madeeasytestseries
0
votes
0
answers
22
Algorithm and data structure
https://gateoverflow.in/?qa=blob&qa_blobid=17275535249024428371
asked
Sep 10, 2018
in
Algorithms
by
manvi_agarwal
(
139
points)

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

159
views
algorithms
heap
binaryheap
timecomplexity
0
votes
0
answers
24
# 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, 2018
in
Algorithms
by
LavTheRawkstar
Active
(
5.2k
points)

75
views
algorithms
heap
sorting
datastructure
binomial
tree
btree
0
votes
1
answer
25
# 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, 2018
in
Algorithms
by
LavTheRawkstar
Active
(
5.2k
points)

65
views
algorithms
heap
heapsort
sorting
0
votes
0
answers
26
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, 2018
in
DS
by
Shiv Gaur
Active
(
1.6k
points)

56
views
heap
algorithms
timecomplexity
0
votes
0
answers
27
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, 2018
in
DS
by
srestha
Veteran
(
110k
points)

145
views
algorithms
sorting
heap
binaryheap
timecomplexity
0
votes
0
answers
28
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, 2018
in
DS
by
srestha
Veteran
(
110k
points)

113
views
heap
timecomplexity
datastructure
0
votes
1
answer
29
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, 2018
in
Others
by
Pooja Khatri
Boss
(
10.5k
points)

346
views
ugcnetjuly2018ii
datastructure
heap
0
votes
0
answers
30
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, 2018
in
Algorithms
by
pradeepchaudhary
Active
(
1.2k
points)

95
views
heap
Page:
1
2
3
4
5
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
GATE score validity queries.
How to prepare for IISC Interdisciplinary Mathematical Sciences Interview
GO Hardcopy for GATE 2020
How to prepare for BARC interview
IIIT H
Follow @csegate
Recent questions tagged heap
Recent Blog Comments
THey removed it this year... I did not check it,...
even though i am not going for iiit , can you...
I don't think IIITD requires any codechef...
Will apply for IIITB. IIIT D requires a codechef...
Go for it. Nobody cares once you join a good IIT...
50,083
questions
53,206
answers
184,553
comments
70,426
users