Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Cormen Edition 3 Exercise 6.1 Question 4 (Page No. 154)
akash.dinkar12
asked
in
Algorithms
Apr 5, 2019
retagged
Apr 6, 2019
by
akash.dinkar12
2,689
views
3
votes
3
votes
Where in a max-heap might the smallest element reside, assuming that all elements are distinct ?
cormen
algorithms
sorting
binary-heap
descriptive
akash.dinkar12
asked
in
Algorithms
Apr 5, 2019
retagged
Apr 6, 2019
by
akash.dinkar12
by
akash.dinkar12
2.7k
views
answer
comment
Follow
share this
share
1 comment
by
Kajal Khobragade
commented
Apr 14, 2019
reply
Follow
share this
Smallest element will be at the last level of the max heap.
0
0
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
4
Answers
1
vote
1
vote
Best answer
In a max heap the smallest element will be one of the leaf nodes.
T(n) = O(n) for finding the smallest element in a max heap.
Tsering_Dorjay
answered
Jul 15, 2020
selected
Apr 18, 2021
by
Arjun
by
Tsering_Dorjay
comment
Follow
share this
0 Comments
Please
log in
or
register
to add a comment.
0
votes
0
votes
smallest element will b at last level of the max heap
Irri
answered
Apr 24, 2019
by
Irri
comment
Follow
share this
1 comment
by
noob_coder
commented
Apr 30, 2019
reply
Follow
share this
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.
2
2
Please
log in
or
register
to add a comment.
0
votes
0
votes
The smallest element in a max-heap will be present at the last level of a max-heap whose index start from floor(n/2)+1, floor(n/2)+2 ...., n.
Avinash31
answered
Jul 11, 2020
by
Avinash31
comment
Follow
share this
0 Comments
Please
log in
or
register
to add a comment.
0
votes
0
votes
Smallest Element will be one of the leaf node.
Sanandan
answered
Sep 9, 2020
by
Sanandan
comment
Follow
share this
0 Comments
Please
log in
or
register
to add a comment.
← Previous
Next →
← Previous in category
Next in category →
Related questions
1
vote
1
vote
0
answers
1
akash.dinkar12
asked
in
Algorithms
Apr 5, 2019
285
views
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$
akash.dinkar12
asked
in
Algorithms
Apr 5, 2019
by
akash.dinkar12
285
views
cormen
algorithms
binary-heap
descriptive
0
votes
0
votes
2
answers
2
akash.dinkar12
asked
in
Algorithms
Apr 5, 2019
1,396
views
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 max-heap ?
akash.dinkar12
asked
in
Algorithms
Apr 5, 2019
by
akash.dinkar12
1.4k
views
cormen
algorithms
binary-heap
descriptive
0
votes
0
votes
1
answer
3
akash.dinkar12
asked
in
Algorithms
Apr 5, 2019
341
views
Cormen Edition 3 Exercise 6.1 Question 5 (Page No. 154)
Is an array that is in sorted order a min-heap ?
akash.dinkar12
asked
in
Algorithms
Apr 5, 2019
by
akash.dinkar12
341
views
data-structures
binary-heap
cormen
descriptive
0
votes
0
votes
0
answers
4
akash.dinkar12
asked
in
Algorithms
Jun 27, 2019
329
views
Cormen Edition 3 Exercise 6.4 Question 1 (Page No. 160)
HEAPSORT(A) 1 BUILD-MAX-HEAP(A) 2 for i = A.length down to 2 3 exchange A[1] with A[i] 4 A.heapsize=A.heapsize – 1 5 MAX-HEAPIFY(A,1) illustrate the operation of HEAPSORT on the array $A=\langle 5,13,2,25,7,17,20,8,4 \rangle$
akash.dinkar12
asked
in
Algorithms
Jun 27, 2019
by
akash.dinkar12
329
views
cormen
algorithms
binary-heap
heap-sort
descriptive
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
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
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy