Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Slides
Recent questions tagged binary-heap
0
votes
1
answer
241
"Max Heapify" algorithm
Consider the following "Max Heapify" algorithm. Array has atleast n and 1<=i<=n. After applying the Max-heapify 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]
piyushkr
asked
in
DS
Dec 30, 2015
by
piyushkr
972
views
data-structures
binary-heap
0
votes
1
answer
242
Is it possible to delete intermediate node/number in Heap?
Is it possible to delete intermediate node/number in Heap? Not a root or last.
Shashank Chavan
asked
in
DS
Dec 18, 2015
by
Shashank Chavan
521
views
data-structures
binary-heap
4
votes
1
answer
243
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))?
Ravi Raaja
asked
in
DS
Nov 24, 2015
by
Ravi Raaja
3.0k
views
combinatory
binary-heap
42
votes
4
answers
244
TIFR CSE 2014 | Part B | Question: 19
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 min-heap (i.e., every node receives the ... $\frac{2}{13}$ $\frac{1}{2^{13}}$
makhdoom ghaya
asked
in
DS
Nov 20, 2015
by
makhdoom ghaya
5.6k
views
tifr2014
binary-heap
0
votes
3
answers
245
How does huffman encoding involve the concept of build-heap algorithm ?
Though the parent node is maximum of both the child nodes but still the procedure we follow is chosing the minimum at each step and adding them to produce a parent node, so how come heapify procedure is called here ?
radha gogia
asked
in
Algorithms
Jun 29, 2015
by
radha gogia
742
views
algorithms
binary-heap
huffman-code
28
votes
1
answer
246
GATE CSE 2015 Set 1 | Question: 32
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$
makhdoom ghaya
asked
in
DS
Feb 13, 2015
by
makhdoom ghaya
6.9k
views
gatecse-2015-set1
data-structures
binary-heap
easy
62
votes
4
answers
247
GATE CSE 2015 Set 2 | Question: 17
Consider a complete binary tree where the left and right subtrees of the root are max-heaps. 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)$
go_editor
asked
in
DS
Feb 12, 2015
by
go_editor
16.2k
views
gatecse-2015-set2
data-structures
binary-heap
normal
1
vote
2
answers
248
Prim's Algorithm
Which one of following statement is false about prim's algorithm? a) It use a running time of O(Elog2V) using binary heap b) It may use a binomial max-heap to represent the priority queue. c) A fibonacci heap imlementation require O(E+V log2V) d) Initially all keys of nodes in priority queue are set to infinity . The root's key is set to 0.
dhingrak
asked
in
Algorithms
Jan 5, 2015
by
dhingrak
2.1k
views
prims-algorithm
binary-heap
time-complexity
11
votes
5
answers
249
What is the complexity of finding 50th smallest element in an already constructed binary min-heap?
What is the complexity of finding $50^{th}$ smallest element in an already constructed binary min-heap? $\Theta(1)$ $\Theta (\log n)$ $\Theta (n)$ $\Theta (n \log n)$
Vikrant Singh
asked
in
DS
Dec 28, 2014
by
Vikrant Singh
3.7k
views
data-structures
binary-heap
time-complexity
51
votes
4
answers
250
GATE IT 2004 | Question: 53
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$ ... to construct a heap in this manner is $O(\log n)$ $O(n)$ $O (n \log \log n)$ $O(n \log n)$
Ishrat Jahan
asked
in
DS
Nov 2, 2014
by
Ishrat Jahan
10.6k
views
gateit-2004
data-structures
binary-heap
normal
37
votes
3
answers
251
GATE IT 2006 | Question: 72
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)$
Ishrat Jahan
asked
in
DS
Nov 1, 2014
by
Ishrat Jahan
7.5k
views
gateit-2006
data-structures
binary-heap
easy
19
votes
1
answer
252
GATE IT 2006 | Question: 44
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\}$
Ishrat Jahan
asked
in
DS
Oct 31, 2014
by
Ishrat Jahan
6.2k
views
gateit-2006
data-structures
binary-heap
easy
1
vote
1
answer
253
What will be the complexity to find the 7th smallest element in a heap?
Monisha
asked
in
DS
Oct 29, 2014
by
Monisha
1.2k
views
data-structures
binary-heap
time-complexity
28
votes
3
answers
254
GATE CSE 1996 | Question: 2.11
The minimum number of interchanges needed to convert the array into a max-heap is $89, 19, 40, 17, 12, 10, 2, 5, 7, 11, 6, 9, 70$ $0$ $1$ $2$ $3$
Kathleen
asked
in
DS
Oct 9, 2014
by
Kathleen
13.5k
views
gate1996
data-structures
binary-heap
easy
23
votes
2
answers
255
GATE CSE 2011 | Question: 23
A max-heap 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 max-heap?
go_editor
asked
in
DS
Sep 29, 2014
by
go_editor
8.0k
views
gatecse-2011
data-structures
binary-heap
easy
21
votes
1
answer
256
GATE CSE 2014 Set 2 | Question: 12
A priority queue is implemented as a Max-Heap. Initially, it has $5$ elements. The level-order traversal of the heap is: $10, 8, 5, 3, 2$. Two new elements $1$ and $7$ ... $10, 8, 7, 2, 3, 1, 5$ $10, 8, 7, 1, 2, 3, 5$ $10, 8, 7, 5, 3, 2, 1$
go_editor
asked
in
DS
Sep 28, 2014
by
go_editor
5.5k
views
gatecse-2014-set2
data-structures
binary-heap
normal
27
votes
2
answers
257
GATE CSE 2006 | Question: 76
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 ... $9, 6, 3, 1, 8, 5$ $9, 3, 6, 8, 5, 1$ $9, 5, 6, 8, 3, 1$
Rucha Shelke
asked
in
DS
Sep 26, 2014
by
Rucha Shelke
4.7k
views
gatecse-2006
data-structures
binary-heap
normal
20
votes
3
answers
258
GATE CSE 1999 | Question: 12
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 min-heap that results from insertion of the following ... empty min-heap: $7, 6, 5, 4, 3, 2, 1$. Show the result after the deletion of the root of this heap.
Kathleen
asked
in
DS
Sep 23, 2014
by
Kathleen
4.4k
views
gate1999
data-structures
binary-heap
normal
descriptive
20
votes
1
answer
259
GATE CSE 2005 | Question: 34
A priority queue is implemented as a Max-Heap. Initially, it has $5$ elements. The level-order traversal of the heap is: $10, 8, 5, 3, 2$. Two new elements $1$ and $7$ ... $10, 8, 7, 2, 3, 1, 5$ $10, 8, 7, 1, 2, 3, 5$ $10, 8, 7, 3, 2, 1, 5$
Kathleen
asked
in
DS
Sep 22, 2014
by
Kathleen
13.9k
views
gatecse-2005
data-structures
binary-heap
normal
75
votes
5
answers
260
GATE CSE 2007 | Question: 47
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)$
Kathleen
asked
in
DS
Sep 21, 2014
by
Kathleen
19.4k
views
gatecse-2007
data-structures
binary-heap
normal
79
votes
10
answers
261
GATE CSE 2003 | Question: 23
In a min-heap 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)$
Disha
asked
in
DS
Sep 19, 2014
by
Disha
31.9k
views
gatecse-2003
data-structures
binary-heap
44
votes
5
answers
262
GATE CSE 2006 | Question: 10
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)$
Rucha Shelke
asked
in
DS
Sep 16, 2014
by
Rucha Shelke
20.7k
views
gatecse-2006
data-structures
binary-heap
easy
25
votes
2
answers
263
GATE CSE 2001 | Question: 1.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 $i-1$ $\lfloor \frac{i}{2} \rfloor$ $\lceil \frac{i}{2} \rceil$ $\frac{(i+1)}{2}$
Kathleen
asked
in
DS
Sep 14, 2014
by
Kathleen
4.9k
views
gatecse-2001
data-structures
binary-heap
easy
Page:
« prev
1
...
4
5
6
7
8
9
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
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
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent questions tagged binary-heap
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...