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
0
votes
1
answer
1
#Algorithms Can Heapsort be applied on Min Heap Data Structure?
I've read and been told that Heapsort can only be applied on Max heap, but this article for G4G states otherwise  https://www.geeksforgeeks.org/heapsortfordecreasingorderusingminheap/ So, is it true that HS can be applied also on Min heap?
asked
Jun 20, 2018
in
Algorithms
by
iarnav
Loyal
(
8.3k
points)

109
views
heap
algorithms
binaryheap
0
votes
1
answer
2
#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, 2018
in
DS
by
iarnav
Loyal
(
8.3k
points)

109
views
binaryheap
heap
+2
votes
1
answer
3
algorithm
Given two inputs bst and min heap tree with $n$ nodes .To get the sorted order which is better and how much time? In the solution for min heap they first used build heap to create min heap thenm usual $log n$ to take minimum but why they use build heap becz i think input is given as a min heap so have already min heap
asked
Jun 19, 2018
in
Algorithms
by
eyeamgj
Loyal
(
6.2k
points)

83
views
heap
algorithms
0
votes
0
answers
4
Heaps
What is the recurrence relation / math expression for the number of binary min heaps possible with "n" elements on which "k" elements are repeated "t" times where t=2 to n?
asked
Jun 17, 2018
in
DS
by
Balaji Jegan
Active
(
4.9k
points)

49
views
heap
datastructure
+1
vote
1
answer
5
GeeksForGeeks
Which data structure is most efficient to find the top 10 largest items out of 1 million items stored in file? A Min heap B Max heap C BST D Sorted array
asked
Jun 15, 2018
in
Algorithms
by
Rishav Kumar Singh
Loyal
(
5.6k
points)

129
views
heap
0
votes
1
answer
6
Space Complexity of Build Max Heap
Since Heapify is a recursive function, its space complexity is $O(logn)$ because of the stack space required for recursion. I also read that space complexity of heapsort is $O(1)$ beause of the explanation here  https://gateoverflow.in/79909/ ... complexity of build heap is $O(logn)$ then heapsorts complexity should also be the same . What am I missing here ?
asked
Jun 14, 2018
in
Algorithms
by
Hardik Maheshwari
(
93
points)

346
views
spacecomplexity
algorithms
heap
heapsort
+1
vote
0
answers
7
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, 2018
in
DS
by
Balaji Jegan
Active
(
4.9k
points)

389
views
datastructure
permutationandcombination
binaryheap
heap
+1
vote
1
answer
8
Dijkstra Time Complexity using Binary Heap
Question Source  https://gateoverflow.in/1374/gate200538 Let G(V,E)be an undirected graph with positive edge weights. Dijkstra's single source shortest path algorithm can be implemented using the binary heap data structure with time complexity: 1. O(V2) 2. O( ... as I > said the correct answer is O((E+V)logV). So, where am I going > wrong?
asked
May 22, 2018
in
Algorithms
by
iarnav
Loyal
(
8.3k
points)

285
views
algorithms
binaryheap
dijkstrasalgorithm
timecomplexity
heap
0
votes
1
answer
9
Fibnocii heap
what is Potential function in Fibonacci heap (i dont remember the question ) plz explain with example
asked
Mar 30, 2018
in
Algorithms
by
akshat sharma
Active
(
2.1k
points)

89
views
heap
algorithms
binaryheap
+2
votes
1
answer
10
Heaps
How many Binary MaxHeaps can be constructed from the elements {1,1,2,2,3,3,4,4} ?
asked
Mar 3, 2018
in
DS
by
Balaji Jegan
Active
(
4.9k
points)

312
views
heap
datastructure
0
votes
0
answers
11
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, 2018
in
Algorithms
by
Na462
Loyal
(
6.9k
points)

182
views
heap
binaryheap
algorithms
0
votes
0
answers
12
MadeEasy Test Series: Programming & DS  Programming In C
Consider the C node fragment given below: Which of the following true about above code if input is given as linked list of nelement in which for each node memory is created in heap area? A. Compiles successfully but execution may ... in else part. I think answer should be C. Because the return type is int node* Can someone please confirm.
asked
Jan 30, 2018
in
Programming
by
Rishabh Gupta 2
Boss
(
17.5k
points)

214
views
madeeasytestseries
programminginc
pointers
structures
linkedlists
heap
+3
votes
2
answers
13
TEST SERIES
PLZ EXPLAIN?
asked
Jan 23, 2018
in
Algorithms
by
Abhi Girin
(
379
points)

208
views
algorithms
heap
+2
votes
0
answers
14
Ace Test Series: Data Structures  Heap And Time Complexity
I think its none of the above?
asked
Jan 21, 2018
in
DS
by
Deepak Mokili
(
217
points)

103
views
acetestseries
datastructure
heap
+3
votes
2
answers
15
Datastructres
The number of distinct max heap are possible with keys 1, 2, 3, 4, 5 are ________.
asked
Jan 20, 2018
in
DS
by
MIRIYALA JEEVAN KUMA
Active
(
2.4k
points)

238
views
binaryheap
heap
algorithms
datastructure
+1
vote
0
answers
16
MadeEasy Test Series: Programming & DS  Heap
How to solve such a problem?
asked
Dec 31, 2017
in
DS
by
Kalpataru Bose
(
401
points)

216
views
madeeasytestseries
datastructure
heap
programminginc
arrays
+5
votes
0
answers
17
Min heap tree
Answer given : 1935360 but I m getting 3225600 please check..
asked
Dec 29, 2017
in
Programming
by
vamp_vaibhav
Active
(
3.5k
points)

154
views
min
heap
0
votes
1
answer
18
Heap Deletion
For searching an element from heap,then delete it from heap Why will it take O(n+log n) time and not O(n log n) time?
asked
Dec 8, 2017
in
Algorithms
by
srestha
Veteran
(
117k
points)

126
views
datastructure
heap
+1
vote
0
answers
19
Heaps
From an array of size n , we need to find the k bigger elements. What is the data structure we should use to find k bigger element in best asymptotic complexity? 1.A max heap of size n. 2. A max heap of size k. 3. A min heap of size n. 4.A min heap of size k.
asked
Dec 5, 2017
in
Algorithms
by
Warlock lord
Active
(
3.3k
points)

178
views
heap
algorithms
datastructure
0
votes
0
answers
20
[Algorithms] Heap sort
Merging k sorted lists of size n/k into one sorted list of nelements using heap sort will take how much time ? My doubt First approach: here it is mentioned heap sort so, heap sort will always take nlogn.and here also we have n elements and it will ... give o(k)+(logk)*(n/k) I think answer should be nlogn only because the second approach is not heap sort. Please check.
asked
Nov 27, 2017
in
Algorithms
by
rahul sharma 5
Boss
(
25.3k
points)

215
views
algorithms
timecomplexity
sorting
heap
+2
votes
0
answers
21
HEAP and its properties
Show that there are at most (n/2^h+1) nodes of height h in any nelement heap.
asked
Nov 10, 2017
in
Algorithms
by
ashwina
Active
(
1.7k
points)

91
views
algorithms
heap
+2
votes
0
answers
22
Worst case running time of MAX_HEAPIFY
Show that the worst case time complexity of MAX_HEAPIFY is Ω(logn ) .
asked
Nov 10, 2017
in
Algorithms
by
ashwina
Active
(
1.7k
points)

59
views
algorithms
heap
+1
vote
0
answers
23
Time Complexity of Max_heapify(A,i) (CLR 3rd edition Page no. 155)
The running time of MAX_HEAPIFY on a subtree of size n rooted at a given node i is the Thete(1) time to fix up the relationships among the element A[i] , A[LEFT(i)] and A[RIGHT(i)] , plus the time to run the ... MAX_HEAPIFY by the recurrence  T(n) <= T(2n/3) + theta(1) Could anyone explain the bold lines in detail ?
asked
Nov 10, 2017
in
Algorithms
by
ashwina
Active
(
1.7k
points)

60
views
algorithms
heap
+4
votes
1
answer
24
Heap  Please explain first statement
asked
Nov 10, 2017
in
Algorithms
by
ankitgupta.1729
Boss
(
16.4k
points)

116
views
heap
0
votes
1
answer
25
UGCNETNov2017II21
Consider an 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<= n), the index of the parent is: A. floor((i+1)/2) B. ceiling((i+1)/2) C. floor(i/2) D. ceiling(i/2)
asked
Nov 9, 2017
in
DS
by
Devwritt
Active
(
4.1k
points)

996
views
ugcnetnov2017ii
datastructure
heap
0
votes
0
answers
26
MadeEasy Subject Test: Programming & DS  Heap
The number of min heap trees are possible with 15 elements such that every leaf node must be greater than all nonleaf nodes of the tree are ________.
asked
Nov 8, 2017
in
DS
by
sunaina rawat
(
171
points)

97
views
madeeasytestseries
datastructure
heap
+1
vote
2
answers
27
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.1k
points)

487
views
heap
binaryheap
datastructure
+1
vote
1
answer
28
UGCNETNov2017iii20
Heap allocation is required for languages that: A. Use dynamic scope rules B. Support dynamic data structures C. Support recursion D. Support recursion and dynamic data structures
asked
Nov 5, 2017
in
DS
by
Arjun
Veteran
(
424k
points)

121
views
ugcnetnov2017iii
datastructure
heap
+5
votes
2
answers
29
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.8k
points)

586
views
heap
algorithms
binaryheap
timecomplexity
0
votes
0
answers
30
Data Structure: Find 7th smallest element in Min heap
In a binary min heap with n elements, the 7th smallest element can be found in _____ ? Answer given is O(logn) and solution: Delete the 1st smallest element O(logn) Delete the 2nd smallest element O(logn) .... ... this solution the data arrangement of the heap will be changed after performing these operation. any better solution than this???
asked
Oct 18, 2017
in
Programming
by
Shubhanshu
Boss
(
18.2k
points)

449
views
heap
binaryheap
timecomplexity
algorithms
Page:
« prev
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
Linear Algebra Important Points
GATE 2020
OFFICIAL GATE MOCK TEST RELEASED
IIITH: Winter Research Admissions 2019 (For Spring 2020)
TIFR and JEST exam
Follow @csegate
Recent questions tagged heap
Recent Blog Comments
It's a question not a post..
i also don't have any pdf, actually, I added the...
i don't have , if you have upload it
@mohan123 Do you have all standard book...
bro can be upload all standard book questions in...
50,647
questions
56,479
answers
195,421
comments
100,555
users