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.1 Question 4 (Page No. 154)
+1
vote
132
views
Where in a maxheap might the smallest element reside, assuming that all elements are distinct ?
cormen
algorithms
sorting
heap
descriptive
asked
Apr 6, 2019
in
Algorithms
by
akash.dinkar12
retagged
Apr 6, 2019
by
akash.dinkar12

132
views
answer
comment
0
Smallest element will be at the last level of the max heap.
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
2
Answers
0
votes
smallest element will b at last level of the max heap
answered
Apr 25, 2019
by
Irri
comment
+1
Not necessarily at last level. Minimum element will be at the leaf node. Eg. consider this max heap 5,4,2,3.
Here 2 is at 2nd level.
Please
log in
or
register
to add a comment.
0
votes
The smallest element in a maxheap will be present at the last level of a maxheap whose index start from floor(n/2)+1, floor(n/2)+2 ...., n.
answered
3 days
ago
by
Avinash Singh Kushwa
comment
Please
log in
or
register
to add a comment.
← Prev.
Next →
← Prev. Qn. in Sub.
Next Qn. in Sub. →
Related questions
+1
vote
0
answers
1
Cormen Edition 3 Exercise 6.1 Question 7 (Page No. 154)
Show that, with the array representation for storing an $n$element heap, the leaves are the nodes indexed by $\lfloor n/2\rfloor +1$,$\lfloor n/2\rfloor +2,…,n$
asked
Apr 6, 2019
in
Algorithms
by
akash.dinkar12

43
views
cormen
algorithms
heap
descriptive
0
votes
2
answers
2
Cormen Edition 3 Exercise 6.1 Question 6 (Page No. 154)
Is the array with values $23,17,14; 6,13,10,1,5,7,12$ a maxheap ?
asked
Apr 6, 2019
in
Algorithms
by
akash.dinkar12

57
views
cormen
algorithms
heap
descriptive
0
votes
1
answer
3
Cormen Edition 3 Exercise 6.1 Question 5 (Page No. 154)
Is an array that is in sorted order a minheap ?
asked
Apr 6, 2019
in
Algorithms
by
akash.dinkar12

46
views
cormen
algorithms
heap
0
votes
0
answers
4
Cormen Edition 3 Exercise 6.4 Question 1 (Page No. 160)
HEAPSORT(A) 1 BUILDMAXHEAP(A) 2 for i = A.length down to 2 3 exchange A[1] with A[i] 4 A.heapsize=A.heapsize – 1 5 MAXHEAPIFY(A,1) illustrate the operation of HEAPSORT on the array $A=\langle 5,13,2,25,7,17,20,8,4 \rangle$
asked
Jun 27, 2019
in
Algorithms
by
akash.dinkar12

36
views
cormen
algorithms
heap
heapsort
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
IISc CDS Interview Experience, 2020
IITD MS CSE (Systems) Experience
IIT Bombay M.Tech. (RA)  Interview Experience
Interview Experience for MS(R)IIT Delhi (School of Information Technology)
PGEE 2020 (CSE) Experience
Subjects
All categories
General Aptitude
2k
Engineering Mathematics
8.3k
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
Thank brother !! Bookmarked it :)
Check out goxul.github.io, it has all the...
congratulation brother ! Can you please tell me...
I got selected for this, in case someone lands up...
After the written exam and at the time of...
Network Sites
GO Mechanical
GO Electrical
GO Electronics
GO Civil
CSE Doubts
52,375
questions
60,585
answers
202,002
comments
95,407
users