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
Cormen Edition 3 Exercise 6.5 Question 8 (Page No. 166)
0
votes
53
views
The operation HEAPDELETE$(A, i)$ deletes the item in node $i$ from heap $A$. Give an implementation of HEAPDELETE that runs in $O(lg\ n)$ time for an $n$element maxheap.
cormen
algorithms
heap
descriptive
asked
Jun 27, 2019
in
Algorithms
by
akash.dinkar12

53
views
answer
comment
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
0
votes
Heap_Delete(A,i)
{
A[i] = A[A.heapsize]
A.heapsize
Max_heapify(A,i)
}
answered
Sep 15, 2019
by
ShrutiS
comment
Please
log in
or
register
to add a comment.
← Prev.
Next →
← Prev. Qn. in Sub.
Next Qn. in Sub. →
Related questions
0
votes
0
answers
1
Cormen Edition 3 Exercise 6.5 Question 9 (Page No. 166)
Give an $O(n\lg\ k)$ time algorithm to merge $k$ sorted lists into one sorted list, where $n$ is the total number of elements in all the input lists. (Hint: Use a minheap for $k$way merging.)
asked
Jun 27, 2019
in
Algorithms
by
akash.dinkar12

32
views
cormen
algorithms
heap
descriptive
0
votes
0
answers
2
Cormen Edition 3 Exercise 6.5 Question 7 (Page No. 166)
Show how to implement a firstin, firstout queue with a priority queue. Show how to implement a stack with a priority queue.
asked
Jun 27, 2019
in
Algorithms
by
akash.dinkar12

31
views
cormen
algorithms
heap
priorityqueue
descriptive
0
votes
0
answers
3
Cormen Edition 3 Exercise 6.5 Question 6 (Page No. 166)
Each exchange operation on line $5$ of HEAPINCREASEKEY typically requires three assignments. Show how to use the idea of the inner loop of INSERTIONSORT to reduce the three assignments down to just one assignment.
asked
Jun 27, 2019
in
Algorithms
by
akash.dinkar12

24
views
cormen
algorithms
heap
descriptive
0
votes
0
answers
4
Cormen Edition 3 Exercise 6.5 Question 5 (Page No. 166)
Argue the correctness of HEAPINCREASEKEY using the following loop invariant: At the start of each iteration of the while loop of lines $46$, the subarray $A[1..A.heapsize]$ satisfies the maxheap property, except that there ... assume that the subarray $A[a..heapsize]$ satisfies the maxheap property at the time HEAPINCREASEKEY is called.
asked
Jun 27, 2019
in
Algorithms
by
akash.dinkar12

18
views
cormen
algorithms
heap
descriptive
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
Interview Experience for MS(R)IIT Delhi (School of Information Technology)
How am I preparing
PGEE 2020 (CSE) Experience
IIT Tirupati MS Interview 2020
IIT Bombay Mtech RA  interview experience (2020)
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 Blog Comments
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...
ISI 2019 : Aarushi Aiyyar's answer to How do...
Network Sites
GO Mechanical
GO Electrical
GO Electronics
GO Civil
CSE Doubts
52,345
questions
60,471
answers
201,797
comments
95,273
users