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
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
ISI2018PCBB5
Consider a maxheap of $n$ distinct integers, $n ≥ 4$, stored in an array $\mathcal{A}[1 . . . n]$. The second minimum of $\mathcal{A}$ is the integer that is less than all integers in $\mathcal{A}$ except the minimum of $\mathcal{A}$. Find all possible array indices of $\mathcal{A}$ in which the second minimum can occur. Justify your answer.
asked
May 12
in
Algorithms
by
akash.dinkar12
Boss
(
40.4k
points)

15
views
isi2018pcbb
algorithms
algorithmdesign
heap
descriptive
0
votes
1
answer
2
ISI 2018 PCB C5
Consider a maxheap of n distinct integers, n ≥ 4, stored in an array A[1 . . . n]. The second minimum of A is the integer that is less than all integers in A except the minimum of A. Find all possible array indices of A in which the second minimum can occur. Justify your answer.
asked
May 2
in
Algorithms
by
N
(
333
points)

38
views
userisi2018
usermod
algorithms
heap
binaryheap
+1
vote
0
answers
3
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
(
40.4k
points)

20
views
cormen
algorithms
heap
descriptive
0
votes
1
answer
4
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
(
40.4k
points)

25
views
cormen
algorithms
heap
descriptive
0
votes
1
answer
5
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
(
40.4k
points)

25
views
cormen
algorithms
heap
0
votes
1
answer
6
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
(
40.4k
points)

53
views
cormen
algorithms
sorting
heap
descriptive
0
votes
0
answers
7
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
(
40.4k
points)

16
views
cormen
algorithms
heap
descriptive
0
votes
0
answers
8
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
(
40.4k
points)

21
views
cormen
algorithms
heap
descriptive
0
votes
0
answers
9
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
(
40.4k
points)

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

2.2k
views
gate2019
datastructure
heap
0
votes
0
answers
11
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
(
1k
points)

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

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

59
views
heap
datastructure
+1
vote
1
answer
14
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)

186
views
heap
binaryheap
timecomplexity
datastructure
0
votes
0
answers
15
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
(
3.7k
points)

37
views
heap
binaryheap
0
votes
1
answer
16
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)

63
views
heap
0
votes
1
answer
17
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)

197
views
algorithms
heap
binaryheap
timecomplexity
sorting
+2
votes
1
answer
18
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.6k
points)

413
views
madeeasytestseries
datastructure
heap
0
votes
0
answers
19
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.3k
points)

164
views
sorting
binaryheap
arrays
heap
datastructure
algorithms
0
votes
1
answer
20
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.3k
points)

80
views
datastructure
binarytree
heap
binaryheap
0
votes
1
answer
21
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.3k
points)

134
views
compilerdesign
runtimeenvironments
operatingsystem
memorymanagement
heap
recursion
activationrecords
0
votes
0
answers
22
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
(
39.5k
points)

142
views
algorithms
heap
+1
vote
0
answers
23
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
(
903
points)

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

65
views
datastructure
algorithms
heap
0
votes
0
answers
25
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
(
193
points)

180
views
algorithms
heap
binaryheap
timecomplexity
0
votes
0
answers
26
# 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)

83
views
algorithms
heap
sorting
datastructure
binomial
tree
btree
0
votes
1
answer
27
# 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)

96
views
algorithms
heap
heapsort
sorting
0
votes
0
answers
28
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.5k
points)

66
views
heap
algorithms
timecomplexity
0
votes
0
answers
29
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
(
111k
points)

154
views
algorithms
sorting
heap
binaryheap
timecomplexity
0
votes
0
answers
30
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
(
111k
points)

134
views
heap
timecomplexity
datastructure
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
The day that made me an IIScian :)
Unanswered Previous year GATE/TIFR questions
From being a Failure to getting into IISc  (Rank 888, Score 692)
My interview experience at IITs/IISc
IIT Delhi CSE Mtech interview 14 may
Follow @csegate
Recent questions tagged heap
Recent Blog Comments
Congratulations 👍 Very nice experience 😊
Congo :) U deserve it :)
Address will be confirmed again before shipping ...
sir by mistake I have given my home address...
Corrected now 👍
49,541
questions
54,071
answers
187,187
comments
70,978
users