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
+10
votes
1
answer
1
ISI2014PCBCS2b
Let $H_1$ and $H_2$ be two complete binary trees that are heaps as well. Assume $H_1$ and $H_2$ are maxheaps, each of size $n$. Design and analyze an efficient algorithm to merge $H_1$ and $H_2$ to a new maxheap $H$ of size $2n$.
asked
May 31, 2016
in
DS
by
jothee
Veteran
(
105k
points)

466
views
descriptive
isi2014pcbcs
algorithms
binarytree
heap
0
votes
1
answer
2
introduction to algorithm 6.2.3 exercise question
$6.23$ What is the effect of calling MAXHEAPIFY(A,i) when the element A[i] is larger that its children?
asked
May 17, 2016
in
Algorithms
by
Shyam Singh 1
Active
(
1.4k
points)

217
views
heap
algorithms
+15
votes
3
answers
3
GATE200960
Consider a binary maxheap implemented using an array. What is the content of the array after two delete operations on $\left\{25,14,16,13,10,8,12\right\}$ $\left\{14,13,12,10, 8\right\}$ $\left\{14,12,13,8,10\right\}$ $\left\{14,13,8,12,10\right\}$ $\left\{14,13,12,8,10\right\}$
asked
Apr 23, 2016
in
DS
by
jothee
Veteran
(
105k
points)

1.4k
views
gate2009
datastructure
heap
normal
0
votes
3
answers
4
The recurrence relation for MAXHEAPIFY function of heapsort algorithm is T(n) <= T(2n/3) + O(1). How is it 2n/3 ?
asked
Apr 20, 2016
in
Algorithms
by
Vivek Jain
Junior
(
781
points)

2k
views
algorithms
timecomplexity
recurrence
heapsort
heap
+30
votes
3
answers
5
GATE2016137
An operator $delete(i)$ for a binary heap data structure is to be designed to delete the item in the $i$th node. Assume that the heap is implemented in an array and $i$ refers to the $i$th index of the array. If the heap tree has depth $d$ (number of edges on the path from the root to the farthest ... $O(d)$ but not $O(1)$ $O(2^d)$ but not $O(d)$ $O(d \ 2^d)$ but not $O(2^d)$
asked
Feb 12, 2016
in
DS
by
Sandeep Singh
Loyal
(
7.2k
points)

4.8k
views
gate20161
datastructure
heap
normal
+47
votes
5
answers
6
GATE2016234
A complete binary minheap is made by including each integer in $[1, 1023]$ exactly once. The depth of a node in the heap is the length of the path from the root of the heap to that node. Thus, the root is at depth $0$. The maximum depth at which integer $9$ can appear is _________.
asked
Feb 12, 2016
in
DS
by
Akash Kanase
Boss
(
41.6k
points)

6.4k
views
gate20162
datastructure
heap
normal
numericalanswers
+1
vote
1
answer
7
Heap Sort best case
What is the Best Case run time of Heap Sort ? A. $O(1)$ B. $O(n)$ C. $O(n \log n)$ D. $O(\log n)$
asked
Jan 20, 2016
in
Algorithms
by
Himanshu1
Boss
(
15.7k
points)

445
views
algorithms
sorting
heap
heapsort
0
votes
1
answer
8
"Max Heapify" algorithm
Consider the following "Max Heapify" algorithm. Array has atleast n and 1<=i<=n. After applying the Maxheapify rooted at A[i], the result will be subtree of A[1,....n] rooted at A[i] is max heap. [Assume that except root A[i], all its children satisfied heap property] Max ... 2p<=n, (2p+1)>=n, A[2p+1]<A[2p] d) p<=n, (2p+1)<=n, A[2p+1]<A[2p]
asked
Dec 30, 2015
in
Algorithms
by
piyushkr
(
205
points)

491
views
heap
+4
votes
1
answer
9
NUMBER OF HEAPS POSSIBLE
# heaps Min or Max_ consider any! Give recurrence relation / math expression For What is the number of min heaps possible with $n$ distinct elements? What is the number of min heaps possible with $n$ elements on which $k$ elements are repeated $t$ times where $t=0$ to infinite (rather considering infinite consider some max value (countable))?
asked
Nov 24, 2015
in
DS
by
Ravi Raaja
(
141
points)

1.6k
views
permutationandcombination
heap
+27
votes
4
answers
10
TIFR2014B19
Consider the following tree with $13$ nodes. Suppose the nodes of the tree are randomly assigned distinct labels from $\left\{1, 2,\ldots,13\right\}$, each permutation being equally likely. What is the probability that the labels form a minheap (i.e., every node receives the minimum label in ... $\frac{2}{13}$ $\frac{1}{2^{13}}$
asked
Nov 20, 2015
in
DS
by
makhdoom ghaya
Boss
(
30.2k
points)

1.3k
views
tifr2014
heap
+20
votes
4
answers
11
GATE2015319
Consider the following array of elements. $\langle 89, 19, 50, 17, 12, 15, 2, 5, 7, 11, 6, 9, 100 \rangle$ The minimum number of interchanges needed to convert it into a maxheap is $4$ $5$ $2$ $3$
asked
Feb 14, 2015
in
DS
by
jothee
Veteran
(
105k
points)

1.6k
views
gate20153
datastructure
heap
normal
+20
votes
2
answers
12
GATE2015132
Consider a max heap, represented by the array: $40, 30, 20, 10, 15, 16, 17, 8, 4$ ... $40, 30, 20, 10, 35, 16, 17, 8, 4, 15$ $40, 35, 20, 10, 15, 16, 17, 8, 4, 30$
asked
Feb 13, 2015
in
DS
by
makhdoom ghaya
Boss
(
30.2k
points)

1.5k
views
gate20151
datastructure
heap
easy
+31
votes
3
answers
13
GATE2015217
Consider a complete binary tree where the left and right subtrees of the root are maxheaps. The lower bound for the number of operations to convert the tree to a heap is $\Omega(\log n)$ $\Omega(n)$ $\Omega(n \log n)$ $\Omega(n^2)$
asked
Feb 12, 2015
in
DS
by
jothee
Veteran
(
105k
points)

4.1k
views
gate20152
datastructure
heap
normal
+9
votes
5
answers
14
What is the complexity of finding 50th smallest element in an already constructed binary minheap?
asked
Dec 28, 2014
in
Algorithms
by
Vikrant Singh
Boss
(
13.5k
points)

1.1k
views
algorithms
binaryheap
heap
+28
votes
2
answers
15
GATE2004IT53
An array of integers of size $n$ can be converted into a heap by adjusting the heaps rooted at each internal node of the complete binary tree starting at the node $\left \lfloor (n  1) /2 \right \rfloor$, and doing this adjustment up to the root node (root node is at index $0$) in ... required to construct a heap in this manner is $O(\log n)$ $O(n)$ $O (n \log \log n)$ $O(n \log n)$
asked
Nov 2, 2014
in
DS
by
Ishrat Jahan
Boss
(
16.3k
points)

2.7k
views
gate2004it
datastructure
heap
normal
+21
votes
3
answers
16
GATE2006IT72
An array $X$ of $n$ distinct integers is interpreted as a complete binary tree. The index of the first element of the array is $0$. If only the root node does not satisfy the heap property, the algorithm to convert the complete binary tree into a heap has the best asymptotic time complexity of $O (n)$ $O (\log n)$ $O (n \log n)$ $O (n \log \log n)$
asked
Nov 1, 2014
in
DS
by
Ishrat Jahan
Boss
(
16.3k
points)

2k
views
gate2006it
datastructure
heap
easy
+15
votes
1
answer
17
GATE2006IT44
Which of the following sequences of array elements forms a heap? $\{23, 17, 14, 6, 13, 10, 1, 12, 7, 5\}$ $\{23, 17, 14, 6, 13, 10, 1, 5, 7, 12\}$ $\{23, 17, 14, 7, 13, 10, 1, 5, 6, 12\}$ $\{23, 17, 14, 7, 13, 10, 1, 12, 5, 7\}$
asked
Nov 1, 2014
in
DS
by
Ishrat Jahan
Boss
(
16.3k
points)

1k
views
gate2006it
datastructure
heap
easy
+19
votes
2
answers
18
GATE19962.11
The minimum number of interchanges needed to convert the array into a maxheap is $89, 19, 40, 17, 12, 10, 2, 5, 7, 11, 6, 9, 70$ $0$ $1$ $2$ $3$
asked
Oct 9, 2014
in
DS
by
Kathleen
Veteran
(
52.2k
points)

3.3k
views
gate1996
datastructure
heap
easy
+16
votes
2
answers
19
GATE201123
A maxheap is a heap where the value of each parent is greater than or equal to the value of its children. Which of the following is a maxheap?
asked
Sep 29, 2014
in
DS
by
jothee
Veteran
(
105k
points)

1.4k
views
gate2011
datastructure
heap
easy
+14
votes
2
answers
20
GATE2014212
A priority queue is implemented as a MaxHeap. Initially, it has $5$ elements. The levelorder traversal of the heap is: $10, 8, 5, 3, 2$. Two new elements $1$ and $7$ are inserted into the heap in that order. The levelorder traversal of the heap after the insertion of the elements is: $10, 8, 7, 3, 2, 1, 5$ $10, 8, 7, 2, 3, 1, 5$ $10, 8, 7, 1, 2, 3, 5$ $10, 8, 7, 5, 3, 2, 1$
asked
Sep 28, 2014
in
DS
by
jothee
Veteran
(
105k
points)

1.1k
views
gate20142
datastructure
heap
normal
+17
votes
2
answers
21
GATE200676
Statement for Linked Answer Questions 76 & 77: A $3$ary max heap is like a binary max heap, but instead of $2$ children, nodes have $3$ children. A $3$ary heap can be represented by an array as follows: The root is stored in the first location, $a[0]$, nodes in the next level, from left to right, is stored ... $9, 6, 3, 1, 8, 5$ $9, 3, 6, 8, 5, 1$ $9, 5, 6, 8, 3, 1$
asked
Sep 26, 2014
in
DS
by
Rucha Shelke
Active
(
3.3k
points)

1.5k
views
gate2006
datastructure
heap
normal
+15
votes
3
answers
22
GATE199912
In binary tree, a full node is defined to be a node with $2$ children. Use induction on the height of the binary tree to prove that the number of full nodes plus one is equal to the number of leaves. Draw the minheap that results from insertion of the following elements in ... initially empty minheap: $7, 6, 5, 4, 3, 2, 1$. Show the result after the deletion of the root of this heap.
asked
Sep 24, 2014
in
DS
by
Kathleen
Veteran
(
52.2k
points)

1.1k
views
gate1999
datastructure
heap
normal
+13
votes
2
answers
23
GATE200534
A priority queue is implemented as a MaxHeap. Initially, it has $5$ elements. The levelorder traversal of the heap is: $10, 8, 5, 3, 2$. Two new elements $1$ and $7$ are inserted into the heap in that order. The levelorder traversal of the heap after the insertion of the elements is: $10, 8, 7, 5, 3, 2, 1$ $10, 8, 7, 2, 3, 1, 5$ $10, 8, 7, 1, 2, 3, 5$ $10, 8, 7, 3, 2, 1, 5$
asked
Sep 22, 2014
in
DS
by
Kathleen
Veteran
(
52.2k
points)

1.4k
views
gate2005
datastructure
heap
normal
+15
votes
3
answers
24
GATE200959
Consider a binary maxheap implemented using an array. Which one of the following array represents a binary maxheap? $\left\{25,12,16,13,10,8,14\right\}$ $\left\{25,14,13,16,10,8,12\right\}$ $\left\{25,14,16,13,10,8,12\right\}$ $\left\{25,14,12,13,10,8,16\right\}$
asked
Sep 22, 2014
in
DS
by
Kathleen
Veteran
(
52.2k
points)

1.7k
views
gate2009
datastructure
heap
normal
+37
votes
3
answers
25
GATE200747
Consider the process of inserting an element into a $Max \: Heap$, where the $Max \: Heap$ is represented by an $array$. Suppose we perform a binary search on the path from the new leaf to the root to find the position for the newly inserted element, the number of $comparisons$ performed is: $\Theta(\log_2n)$ $\Theta(\log_2\log_2n)$ $\Theta(n)$ $\Theta(n\log_2n)$
asked
Sep 22, 2014
in
DS
by
Kathleen
Veteran
(
52.2k
points)

4.8k
views
gate2007
datastructure
heap
normal
+37
votes
6
answers
26
GATE200323
In a minheap with $n$ elements with the smallest element at the root, the $7^{th}$ smallest element can be found in time $\Theta (n \log n)$ $\Theta (n)$ $\Theta(\log n)$ $\Theta(1)$
asked
Sep 19, 2014
in
DS
by
Disha
(
81
points)

8.9k
views
gate2003
datastructure
heap
+16
votes
3
answers
27
GATE200437
The elements $32, 15, 20, 30, 12, 25, 16,$ are inserted one by one in the given order into a maxHeap. The resultant maxHeap is
asked
Sep 19, 2014
in
DS
by
Kathleen
Veteran
(
52.2k
points)

1.6k
views
gate2004
datastructure
heap
normal
+23
votes
4
answers
28
GATE200610
In a binary max heap containing $n$ numbers, the smallest element can be found in time $O(n)$ $O(\log n)$ $O(\log \log n)$ $O(1)$
asked
Sep 16, 2014
in
DS
by
Rucha Shelke
Active
(
3.3k
points)

3.5k
views
gate2006
datastructure
heap
easy
+15
votes
2
answers
29
GATE20011.15
Consider any array representation of an $n$ element binary heap where the elements are stored from index $1$ to index $n$ of the array. For the element stored at index $i$ of the array $(i \leq n)$, the index of the parent is $i1$ $\lfloor \frac{i}{2} \rfloor$ $\lceil \frac{i}{2} \rceil$ $\frac{(i+1)}{2}$
asked
Sep 14, 2014
in
DS
by
Kathleen
Veteran
(
52.2k
points)

1.6k
views
gate2001
datastructure
heap
easy
Page:
« prev
1
2
3
4
5
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
ECIL Interview Experience
Linear Algebra Important Points
GATE 2020
OFFICIAL GATE MOCK TEST RELEASED
IIITH: Winter Research Admissions 2019 (For Spring 2020)
Follow @csegate
Recent questions tagged heap
Recent Blog Comments
@Ayush Upadhyaya Thank you so much! ^_^
@JashanAroraNo No. Don't directly say no.Think a...
@jeetYes, I am sorry for that.I saw ECIL Advt...
Congratulations man! A little question, please?...
Is IT eligible to apply in ECIL because they only...
50,645
questions
56,584
answers
195,786
comments
101,828
users