The Gateway to Computer Science Excellence
For all GATE CSE Questions
Toggle navigation
GATE Overflow
Facebook Login
Google Login
or
Email or Username
Password
Remember
Login
Register

I forgot my password
All Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous
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 binaryheap
Slides
0
votes
0
answers
1
No. of comparison in min heap
What is the number of comparisons required to extract 45th element of the min heap?
asked
Sep 10
in
Algorithms
by
bts1jimin
(
67
points)

64
views
algorithms
heap
binaryheap
timecomplexity
0
votes
1
answer
2
#binary heap
asked
Aug 29
in
Programming
by
Shubham Aggarwal
Junior
(
617
points)

20
views
binaryheap
0
votes
0
answers
3
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
in
DS
by
srestha
Veteran
(
95.9k
points)

98
views
algorithms
sorting
heap
binaryheap
timecomplexity
0
votes
0
answers
4
#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
in
DS
by
iarnav
Loyal
(
8.1k
points)

65
views
algorithms
binaryheap
heap
datastructure
0
votes
0
answers
5
#DS Min Heaps Possible?
The number of possible minheaps containing each value from {1,1,1,1,1,1,1} exactly once is _______ This is a variance of Gate 2018 question and how will we deal if all values are same?
asked
Jun 24
in
DS
by
iarnav
Loyal
(
8.1k
points)

45
views
algorithms
binaryheap
datastructure
+1
vote
0
answers
6
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
in
Programming
by
srestha
Veteran
(
95.9k
points)

87
views
heap
algorithms
binaryheap
datastructure
0
votes
1
answer
7
#Algorithms Can Heapsort be applied on Min Heap Data Structure?
asked
Jun 20
in
Algorithms
by
iarnav
Loyal
(
8.1k
points)

37
views
heap
algorithms
binaryheap
0
votes
1
answer
8
#Binary Max Heap Question (Doubt)
Let's say we're given with a MAX Heap and we want to delete any of the leaf node, then how much time will it take to delete any of the leaf node and maintain the max heap property? My main doubt is  will it O(n) time to reach to leaf nodes?
asked
Jun 19
in
DS
by
iarnav
Loyal
(
8.1k
points)

75
views
binaryheap
heap
0
votes
0
answers
9
Number of Max Heap
How many maxheaps can be formed with the following elements? $\{1,1,1,2,2,2,3,3,3,4,4,4\}$
asked
Jun 4
in
DS
by
Balaji Jegan
Active
(
1.7k
points)

180
views
datastructure
permutationsandcombinations
binaryheap
heap
0
votes
1
answer
10
Dijkstra Time Complexity using Binary Heap
asked
May 22
in
Algorithms
by
iarnav
Loyal
(
8.1k
points)

69
views
algorithms
binaryheap
dijkstrasalgorithm
timecomplexity
heap
0
votes
0
answers
11
Heap DataStructure
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 $(n/2)^{th}$ element present at maximum level and minimum level is ________. [Assume root is present at $level1$] ? Please Tell me the Approach
asked
May 20
in
Algorithms
by
Na462
Loyal
(
5.6k
points)

44
views
algorithms
binaryheap
0
votes
1
answer
12
Doubt on Heap
How much time will it take for deleting $i^{th}$ and a number $n(random)$ node from a heap ?
asked
Apr 28
in
Algorithms
by
Akash Kumar Roy
(
473
points)

64
views
algorithms
binaryheap
0
votes
1
answer
13
Fibnocii heap
what is Potential function in Fibonacci heap (i dont remember the question ) plz explain with example
asked
Mar 30
in
Algorithms
by
akshat sharma
Active
(
1.6k
points)

64
views
heap
algorithms
binaryheap
0
votes
0
answers
14
Heap Smallest Element
My question is in Question like find 5th Smallest element in a heap: It requires O(logn) time if we do only Delete operation 5 Times.But what if the array contains no 5th smallest element say our array contain [1,1,1,1,1,1,1,1,1,1] now ... need to do extract min operation n number of times which would give nlogn time? Plz Clear my doubt https://gateoverflow.in/1110/gate200323
asked
Feb 17
in
Algorithms
by
Na462
Loyal
(
5.6k
points)

110
views
heap
binaryheap
algorithms
+5
votes
2
answers
15
Max Heap Counting
MY SOLUTION : Fix the root then next level 2 elements ( 2! possibilities) next level 4 elements( 4! possibilities) last level 2 elements ( 2! possibilities) total possibility = 2! * 4! * 2! = 2 * 24 * 2 = 96 what went wrong ? just in case if the ... ,1,7,9 such that if node of above graph is filled with these elements it satisfies max heap property a)96 b)896 c)2688 d) none
asked
Jan 24
in
DS
by
A_i_$_h
Boss
(
12.3k
points)

367
views
madeeasytestseries
max
binaryheap
+3
votes
2
answers
16
Datastructres
The number of distinct max heap are possible with keys 1, 2, 3, 4, 5 are ________.
asked
Jan 20
in
DS
by
MIRIYALA JEEVAN KUMA
Active
(
2k
points)

180
views
binaryheap
heap
algorithms
datastructure
+4
votes
1
answer
17
Max heap no. of interchange required
asked
Jan 7
in
DS
by
Lakshman Patel RJIT
Loyal
(
8k
points)

107
views
datastructure
binaryheap
+1
vote
2
answers
18
Max Heap
The number of ways in which the numbers 1, 2, 3, 4, 5 can be inserted into binary heap. Such that resulted binary heap is max heap ________.
asked
Nov 7, 2017
in
DS
by
shivangi5
Active
(
1.4k
points)

312
views
heap
binaryheap
datastructure
+5
votes
2
answers
19
Min Heap
In a minheap, the next largest element of a particular element can be found in ___ time. A) O(1) B) O(log n) C) O(n)
asked
Oct 31, 2017
in
Algorithms
by
Shivam Chauhan
Loyal
(
8.9k
points)

300
views
heap
algorithms
binaryheap
timecomplexity
0
votes
0
answers
20
Data Structure: Find 7th smallest element in Min heap
asked
Oct 18, 2017
in
Programming
by
Shubhanshu
Boss
(
15.2k
points)

296
views
heap
binaryheap
timecomplexity
algorithms
0
votes
1
answer
21
cormen page 157159
While proving that the running time of the BUILDMAXHEAP to be O(n) and not O(n lgn), the have considered the number of nodes or elements at some height 'h' to be n/2^(h+1). How? All I know is that 2^h alone can give you number of nodes at some heigh h. I do not understand this. Can someone explain in detail?
asked
Sep 10, 2017
in
Algorithms
by
Warlock lord
Active
(
3.4k
points)

55
views
algorithms
binaryheap
+2
votes
0
answers
22
CLRS Heapsort, number of nodes of height h ?
asked
Jul 5, 2017
in
Programming
by
bhuv
Active
(
3.9k
points)

107
views
algorithms
binaryheap
+1
vote
2
answers
23
binary heap
Consider a binary min heap containing n elements and every node is having degree 2 ( i.e. full binary min heap tree). What is the probability of finding the largest element at the last level ? According to my understanding the largest elemenyt has to be a leaf and since leafs can be on two levels last and second last therefore the probability should be 1/2
asked
Jan 15, 2017
in
Algorithms
by
Pankaj Joshi
Active
(
3k
points)

236
views
heap
binaryheap
algorithms
geekmock2017
+7
votes
2
answers
24
Max Heap
The number of ways , in which numbers 1,2,3,4,5 can be inserted into binary heap,such that resultant binary heap is max heap ? given ans :8
asked
Dec 9, 2016
in
Programming
by
minal
Boss
(
15.3k
points)

938
views
heap
binaryheap
algorithms
+3
votes
1
answer
25
Binary Max Heap
In a binary max heap containing n numbers, the smallest element can be found in time?
asked
Sep 13, 2016
in
DS
by
Hardik Vagadia
(
427
points)

383
views
binaryheap
heap
+1
vote
2
answers
26
Algorithm_heap
The number of ways in which the numbers 1, 2, 3, 4, 5 can be inserted into a Binary Heap such that resulted binary heap is Max Heap. Please give the ans and what is the formula for n distinct elements?
asked
Sep 10, 2016
in
DS
by
Tariq Husain Khan
Junior
(
835
points)

488
views
datastructure
binaryheap
+5
votes
2
answers
27
7th smallest element in a MinHeap
In a minheap with n elements 1). The 7th smallest element can be found in time, if duplicates are allowed ? 2). The 7th distinct smallest element can be found in time, If duplicates are allowed ?
asked
Sep 4, 2016
in
Algorithms
by
Kapil
Veteran
(
50.2k
points)

1k
views
algorithms
heap
binaryheap
sorting
timecomplexity
Page:
1
2
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
kvs pgt
Algorithms GO Classroom
Programming and DS GO Classroom
Discrete Mathematics GO Classroom
Digital Logic GO Classroom
Follow @csegate
Gatecse
Recent questions tagged binaryheap
Recent Blog Comments
[email protected]
@Swaraj i got 74.22 %
@sanjay sharma , my gmail id ...
@sanjay sharma my mail id is
[email protected]
yes btech (cs) are eligible and to get question...
39,655
questions
46,732
answers
140,409
comments
58,125
users