menu
Recent questions tagged heap
Login
Register
My account
Edit my Profile
Private messages
My favorites
Register
Recent questions tagged heap
All Activity
Q&A
Questions
Unanswered
Tags
Categories
Users
Ask a Question
Blogs
Previous Year
Recent questions tagged heap
0
votes
0
answers
1.0k
views
GATE CSE 2021 Set 2 | Question: 2 | Video Solution
Arjun
asked
in
DS
Feb 18, 2021
by
Arjun
1.4k
points
1.0k
views
gate2021-cse-set2
data-structures
heap
binary-heap
time-complexity
1
vote
0
answers
40
views
Made easy Topicwise DS
"Consider the following array of elements <40, 35, 20, 10, 15, 16, 17, 8, 4, 30>. The minimum number of interchanges needed to convert it into a min-heap is _________ using built heap method." I am getting 7.
anurags228
asked
in
Programming
Jan 6, 2021
by
anurags228
23
points
40
views
heap
binary-tree
data-structures
0
votes
1
answer
79
views
Made Easy Test Series
Sir, The above is a min-max heap with all the nodes at even level rooting a min-heap, and all the nodes at odd level rooting a max-heap. Starting level of the heap is taken to be 0. Now we need to find the worst case time complexity of ... will be 2 levels down the root. I am confused in step 3 in both the operations. Please help me understand the procedure. Thank you!
sankalpmittal
asked
in
Algorithms
Aug 15, 2020
by
sankalpmittal
41
points
79
views
made-easy-test-series
heap
0
votes
1
answer
48
views
Made Easy Test Series
Can you please give me any idea or intuition to approach such types of questions? Only way I can think of is to just try drawing the heap. Like check for level 2 if possible. If not, check level 3 and so on. Can you please tell me some approach to solve these types of problems? Thank you.
sankalpmittal
asked
in
Algorithms
Aug 15, 2020
by
sankalpmittal
41
points
48
views
made-easy-test-series
heap
0
votes
0
answers
22
views
GATE2003-23 Video Solution
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)$
admin
asked
in
DS
Apr 18, 2020
by
admin
589
points
22
views
gate2003
data-structures
heap
video-solution
0
votes
0
answers
17
views
GATE2016-2-34 Video Solution
A complete binary min-heap 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 _________.
admin
asked
in
DS
Apr 18, 2020
by
admin
589
points
17
views
gate2016-2
data-structures
heap
normal
numerical-answers
video-solution
0
votes
0
answers
29
views
GATE2007-47 Video Solution
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)$
admin
asked
in
DS
Apr 18, 2020
by
admin
589
points
29
views
gate2007
data-structures
heap
normal
video-solution
0
votes
0
answers
19
views
GATE2016-1-37 Video Solution
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 ... $O(d)$ but not $O(1)$ $O(2^d)$ but not $O(d)$ $O(d \ 2^d)$ but not $O(2^d)$
admin
asked
in
DS
Apr 18, 2020
by
admin
589
points
19
views
gate2016-1
data-structures
heap
normal
video-solution
0
votes
0
answers
15
views
GATE2015-2-17 Video Solution
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)$
admin
asked
in
DS
Apr 18, 2020
by
admin
589
points
15
views
gate2015-2
data-structures
heap
normal
video-solution
0
votes
0
answers
16
views
GATE2006-10 Video Solution
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)$
admin
asked
in
DS
Apr 18, 2020
by
admin
589
points
16
views
gate2006
data-structures
heap
easy
video-solution
0
votes
0
answers
15
views
GATE1996-2.11 Video Solution
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$
admin
asked
in
DS
Apr 18, 2020
by
admin
589
points
15
views
gate1996
data-structures
heap
easy
video-solution
0
votes
0
answers
20
views
GATE2019-40 Video Solution
Consider the following statements: The smallest element in a max-heap is always at a leaf node The second largest element in a max-heap is always a child of a root node A max-heap can be constructed from a binary search tree in $\theta(n)$ time A binary search tree ... time Which of te above statements are TRUE? I, II and III I, II and IV I, III and IV II, III and IV
admin
asked
in
DS
Apr 18, 2020
by
admin
589
points
20
views
gate2019
data-structures
heap
video-solution
0
votes
0
answers
32
views
GATE2004-IT-53 Video Solution
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)$
admin
asked
in
DS
Apr 18, 2020
by
admin
589
points
32
views
gate2004-it
data-structures
heap
normal
video-solution
0
votes
0
answers
23
views
GATE2006-IT-72 Video Solution
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)$
admin
asked
in
DS
Apr 18, 2020
by
admin
589
points
23
views
gate2006-it
data-structures
heap
easy
video-solution
0
votes
0
answers
16
views
GATE2015-3-19 Video Solution
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 max-heap is $4$ $5$ $2$ $3$
admin
asked
in
DS
Apr 18, 2020
by
admin
589
points
16
views
gate2015-3
data-structures
heap
normal
video-solution
0
votes
0
answers
13
views
GATE2005-34 Video Solution
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$
admin
asked
in
DS
Apr 18, 2020
by
admin
589
points
13
views
gate2005
data-structures
heap
normal
video-solution
0
votes
0
answers
29
views
GATE2009-59 Video Solution
Consider a binary max-heap implemented using an array. Which one of the following array represents a binary max-heap? $\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\}$
admin
asked
in
DS
Apr 18, 2020
by
admin
589
points
29
views
gate2009
data-structures
heap
normal
video-solution
0
votes
0
answers
13
views
GATE2001-1.15 Video Solution
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}$
admin
asked
in
DS
Apr 18, 2020
by
admin
589
points
13
views
gate2001
data-structures
heap
easy
video-solution
0
votes
0
answers
20
views
GATE2015-1-32 Video Solution
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$
admin
asked
in
DS
Apr 18, 2020
by
admin
589
points
20
views
gate2015-1
data-structures
heap
easy
video-solution
0
votes
0
answers
20
views
GATE2004-37 Video Solution
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
admin
asked
in
DS
Apr 18, 2020
by
admin
589
points
20
views
gate2004
data-structures
heap
normal
video-solution
0
votes
0
answers
27
views
GATE2009-60 Video Solution
Consider a binary max-heap 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\}$
admin
asked
in
DS
Apr 18, 2020
by
admin
589
points
27
views
gate2009
data-structures
heap
normal
video-solution
0
votes
0
answers
28
views
GATE2011-23 Video Solution
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?
admin
asked
in
DS
Apr 18, 2020
by
admin
589
points
28
views
gate2011
data-structures
heap
easy
video-solution
0
votes
0
answers
19
views
GATE2006-76 Video Solution
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$
admin
asked
in
DS
Apr 18, 2020
by
admin
589
points
19
views
gate2006
data-structures
heap
normal
video-solution
0
votes
0
answers
18
views
GATE2006-77 Video Solution
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 ... $10, 9, 4, 5, 7, 6, 8, 2, 1, 3$ $10, 8, 6, 9, 7, 2, 3, 4, 1, 5$
admin
asked
in
DS
Apr 18, 2020
by
admin
589
points
18
views
gate2006
data-structures
heap
normal
video-solution
0
votes
0
answers
16
views
GATE1999-12 Video Solution
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.
admin
asked
in
DS
Apr 18, 2020
by
admin
589
points
16
views
gate1999
data-structures
heap
normal
video-solution
0
votes
0
answers
26
views
GATE2014-2-12 Video Solution
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$
admin
asked
in
DS
Apr 18, 2020
by
admin
589
points
26
views
gate2014-2
data-structures
heap
normal
video-solution
0
votes
0
answers
21
views
GATE2006-IT-44 Video Solution
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\}$
admin
asked
in
DS
Apr 18, 2020
by
admin
589
points
21
views
gate2006-it
data-structures
heap
easy
video-solution
0
votes
0
answers
34
views
GATE1990-2-viii Video Solution
Match the pairs in the following questions: ...
admin
asked
in
DS
Apr 18, 2020
by
admin
589
points
34
views
gate1990
match-the-following
data-structures
heap
video-solution
0
votes
1
answer
46
views
What happens if we are inconsistent while creating Huffman Tree ? (Self Doubt)
surbhijain93
asked
in
Algorithms
Apr 9, 2020
by
surbhijain93
5
points
46
views
algorithms
huffman-code
heap
2
votes
0
answers
29
views
Gatebook Heaps
What is the minimum number of comparisons required in the worst case to find the smallest element in a min-heap? Can someone please explain the procedure. The answer is 50*51 / 2
neeraj_bhatt
asked
in
DS
Jan 20, 2020
by
neeraj_bhatt
475
points
29
views
heap
gatebook
4
votes
1
answer
441
views
Made Easy test series algorithm binary Max heaps
Total number of ordering possible with elements 12, 10, 8, 5, 3, 2, 1, 13, 7, 9, 18 such that it satisfied max heap property ________.
Ram Swaroop
asked
in
Algorithms
Dec 26, 2019
by
Ram Swaroop
393
points
441
views
made-easy-test-series
algorithms
combinatory
max
heap
0
votes
1
answer
67
views
Made Easy Test Series:DS
The number of min heaps possible with 15 distinct elements such that every leaf node is greater than all the non-leaf nodes are ______
Sambhrant Maurya
asked
in
DS
Nov 27, 2019
by
Sambhrant Maurya
493
points
67
views
made-easy-test-series
data-structures
heap
0
votes
0
answers
103
views
Cormen 3e Chapter 6 Exercise 6.5-9
Give an O(nlogk)-time algorithm to merge k sorted lists into one sorted list, where n is the total number of elements in all input lists. (Use a min-heap for k-way merge)
aditi19
asked
in
Algorithms
Nov 19, 2019
by
aditi19
59
points
103
views
cormen
heap
merging
data-structures
0
votes
0
answers
39
views
Self doubt (Algorithms)
Time complexity of the best possible algorithm to transform a min-heap to max-heap is?
Priyansh Singh
asked
in
Algorithms
Nov 18, 2019
by
Priyansh Singh
229
points
39
views
heap
To see more, click for the
full list of questions
or
popular tags
.
Ask a Question
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
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
Recent Posts
New GATEOverflow PDFs
Guidelines to users
No Recent Blog Comments
Search GATE CSE Video Solutions