The Gateway to Computer Science Excellence
For all GATE CSE Questions
Toggle navigation
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
+3
votes
1
answer
1
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, 2018
in
Programming
by
srestha

688
views
heap
algorithms
binaryheap
datastructures
0
votes
1
answer
2
#DataStructure Heaps Self Doubt.
In a binary Heap of 100 elements time taken to find the 99th element? or in a binary heap on "n" elements, time taken to find (n1)th element? Note ; I'm not asking about smallest or largest, but simply the 99th element.
asked
Jun 21, 2018
in
DS
by
iarnav

161
views
algorithms
heap
0
votes
1
answer
3
#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

186
views
heap
algorithms
binaryheap
0
votes
1
answer
4
#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

140
views
binaryheap
heap
+2
votes
1
answer
5
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

131
views
heap
algorithms
0
votes
0
answers
6
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

66
views
heap
datastructures
+1
vote
1
answer
7
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 16, 2018
in
Algorithms
by
Rishav Kumar Singh

273
views
heap
0
votes
1
answer
8
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

668
views
spacecomplexity
algorithms
heap
heapsort
+1
vote
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 5, 2018
in
DS
by
Balaji Jegan

471
views
datastructures
combinatory
binaryheap
heap
+1
vote
1
answer
10
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

473
views
algorithms
binaryheap
dijkstrasalgorithm
timecomplexity
heap
0
votes
1
answer
11
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

108
views
heap
algorithms
binaryheap
+2
votes
1
answer
12
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

373
views
heap
datastructures
0
votes
0
answers
13
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

223
views
heap
binaryheap
algorithms
+1
vote
1
answer
14
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

266
views
madeeasytestseries
programminginc
pointers
structures
linkedlists
heap
+3
votes
2
answers
15
TEST SERIES
PLZ EXPLAIN?
asked
Jan 23, 2018
in
Algorithms
by
Abhi Girin

225
views
algorithms
heap
+2
votes
0
answers
16
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

140
views
acetestseries
datastructures
heap
+3
votes
2
answers
17
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

294
views
binaryheap
heap
algorithms
datastructures
+1
vote
0
answers
18
MadeEasy Test Series: Programming & DS  Heap
How to solve such a problem?
asked
Dec 31, 2017
in
DS
by
Kalpataru Bose

249
views
madeeasytestseries
datastructures
heap
programminginc
arrays
+5
votes
0
answers
19
Min heap tree
Answer given : 1935360 but I m getting 3225600 please check..
asked
Dec 29, 2017
in
Programming
by
vamp_vaibhav

178
views
min
heap
0
votes
1
answer
20
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 9, 2017
in
Algorithms
by
srestha

143
views
datastructures
heap
+2
votes
0
answers
21
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

238
views
heap
algorithms
datastructures
0
votes
2
answers
22
[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

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

101
views
algorithms
heap
+2
votes
0
answers
24
Worst case running time of MAX_HEAPIFY
Show that the worst case time complexity of MAX_HEAPIFY is Ω(logn ) .
asked
Nov 11, 2017
in
Algorithms
by
ashwina

69
views
algorithms
heap
+1
vote
0
answers
25
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

86
views
algorithms
heap
+4
votes
1
answer
26
Heap  Please explain first statement
asked
Nov 10, 2017
in
Algorithms
by
ankitgupta.1729

130
views
heap
0
votes
1
answer
27
UGCNETNov2017II: 21
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

1.3k
views
ugcnetnov2017ii
datastructures
heap
0
votes
0
answers
28
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

125
views
madeeasytestseries
datastructures
heap
+1
vote
3
answers
29
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

734
views
heap
binaryheap
datastructures
+1
vote
1
answer
30
UGCNETNov2017iii20
Heap allocation is required for languages that Use dynamic scope rules Support dynamic data structures Support recursion Support recursion and dynamic data structures
asked
Nov 5, 2017
in
DS
by
Arjun

165
views
ugcnetnov2017iii
datastructures
heap
Page:
« prev
1
2
3
4
5
6
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
IITD MS CSE (Systems) Experience
IIT Bombay M.Tech. (RA)  Interview Experience
Interview Experience for MS(R)IIT Delhi (School of Information Technology)
How am I preparing
PGEE 2020 (CSE) Experience
Subjects
All categories
General Aptitude
(2k)
Engineering Mathematics
(8.2k)
Digital Logic
(2.9k)
Programming and DS
(5k)
Algorithms
(4.4k)
Theory of Computation
(6.2k)
Compiler Design
(2.2k)
Operating System
(4.6k)
Databases
(4.2k)
CO and Architecture
(3.4k)
Computer Networks
(4.2k)
Non GATE
(1.2k)
Others
(1.5k)
Admissions
(595)
Exam Queries
(562)
Tier 1 Placement Questions
(23)
Job Queries
(71)
Projects
(19)
Unknown Category
(1k)
Recent questions tagged heap
Recent Blog Comments
Can someone tell me how to check part B marks?...
After getting so many mails from you...
Refund will be given for such cases if applied...
@sreejit007 they don't publish any cutoff or...
@ranjanabhi Can you please elaborate what did...
Network Sites
GO Mechanical
GO Electrical
GO Electronics
GO Civil
CSE Doubts
52,345
questions
60,497
answers
201,859
comments
95,315
users