The Gateway to Computer Science Excellence
For all GATE CSE Questions
Toggle navigation
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
Recent questions tagged heap
0
votes
0
answers
1
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
(
41.9k
points)

20
views
cormen
algorithms
heap
descriptive
0
votes
0
answers
2
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
(
41.9k
points)

25
views
cormen
algorithms
heap
descriptive
0
votes
0
answers
3
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
(
41.9k
points)

21
views
cormen
algorithms
heap
descriptive
+3
votes
5
answers
4
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
(
425k
points)

2.6k
views
gate2019
datastructure
heap
0
votes
1
answer
5
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.3k
points)

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

296
views
heap
datastructure
binaryheap
algorithms
madeeasytestseries
+2
votes
1
answer
7
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
(
14.7k
points)

79
views
heap
datastructure
+1
vote
1
answer
8
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
(
125
points)

303
views
heap
binaryheap
timecomplexity
datastructure
0
votes
1
answer
9
NIELIT 201884
For the given nodes: $89, 19, 50, 17, 12, 15, 2, 5, 7, 11, 6, 9, 100$ minimum ______ number of interchanges are required to convert it into a maxheap. $3$ $4$ $5$ $6$
asked
Dec 7, 2018
in
DS
by
Arjun
Veteran
(
425k
points)

41
views
nielit2018
heap
datastructure
0
votes
0
answers
10
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
(
5.1k
points)

44
views
heap
binaryheap
0
votes
1
answer
11
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.5k
points)

72
views
heap
+1
vote
1
answer
12
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
(
2.1k
points)

263
views
algorithms
heap
binaryheap
timecomplexity
sorting
+2
votes
1
answer
13
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.8k
points)

530
views
madeeasytestseries
datastructure
heap
0
votes
0
answers
14
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.4k
points)

205
views
sorting
binaryheap
arrays
heap
datastructure
algorithms
0
votes
1
answer
15
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.4k
points)

95
views
datastructure
binarytree
heap
binaryheap
+1
vote
1
answer
16
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.4k
points)

185
views
compilerdesign
runtimeenvironments
operatingsystem
memorymanagement
heap
recursion
activationrecords
0
votes
0
answers
17
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
Veteran
(
54.9k
points)

165
views
algorithms
heap
+1
vote
0
answers
18
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
(
927
points)

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

75
views
datastructure
algorithms
heap
0
votes
0
answers
20
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
(
199
points)

234
views
algorithms
heap
binaryheap
timecomplexity
0
votes
0
answers
21
# 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
(
3.7k
points)

110
views
algorithms
heap
sorting
datastructure
binomial
tree
btree
0
votes
1
answer
22
# 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
(
3.7k
points)

117
views
algorithms
heap
heapsort
sorting
0
votes
0
answers
23
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)

91
views
heap
algorithms
timecomplexity
0
votes
0
answers
24
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
(
117k
points)

176
views
algorithms
sorting
heap
binaryheap
timecomplexity
0
votes
0
answers
25
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
(
117k
points)

168
views
heap
timecomplexity
datastructure
0
votes
2
answers
26
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.8k
points)

642
views
ugcnetjuly2018ii
datastructure
heap
0
votes
0
answers
27
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)

133
views
heap
0
votes
1
answer
28
#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, 2018
in
DS
by
iarnav
Loyal
(
8.3k
points)

129
views
algorithms
binaryheap
heap
datastructure
+3
votes
1
answer
29
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, 2018
in
Programming
by
srestha
Veteran
(
117k
points)

472
views
heap
algorithms
binaryheap
datastructure
0
votes
1
answer
30
#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, 2018
in
DS
by
iarnav
Loyal
(
8.3k
points)

138
views
algorithms
heap
Page:
« prev
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
Linear Algebra Important Points
GATE 2020
OFFICIAL GATE MOCK TEST RELEASED
IIITH: Winter Research Admissions 2019 (For Spring 2020)
TIFR and JEST exam
Follow @csegate
Recent questions tagged heap
Recent Blog Comments
Lakshman Patel RJIT Do you have such notes...
Great work sir
Yes Sir, It will be very helpful if we get...
@arjun sir is there a pdf...
Really helpful sir Thanks a ton👍👍
50,645
questions
56,558
answers
195,717
comments
101,587
users