Algorithms: Cormen Edition 3 Exercise 6.1 Question 4 (Page No. 154)

GATE Overflow for GATE CSE
  • Ask
  • Activity
  • Q&A
  • Questions
  • Unanswered
  • Tags
  • Subjects
  • Users
  • Previous Years
  • Blogs
  • All Polls
  • New Blog
  • Exams
Dark Mode asked Apr 5, 2019 retagged Apr 6, 2019 by 3,216 views 3 3 votes Where in a max-heap might the smallest element reside, assuming that all elements are distinct ?
  • Algorithms
  • cormen
  • algorithms
  • sorting
  • binary-heap
  • descriptive
+ User Avatar 346 681 870 3.2k views answer comment Share Follow 🖨️ Print See 1 comment

1 1 comment reply

User Avatar 8 14 20 commented Apr 14, 2019 reply Follow flag Smallest element will be at the last level of the max heap. 0 0 reply Share

Please log in or register to add a comment.

Please log in or register to answer this question.

4 Answers

Best answer 1 1 vote 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. answered Jul 15, 2020 selected Apr 18, 2021 by User Avatar 1 comment Share Follow

0 reply

Please log in or register to add a comment.

0 0 votes smallest element will b at last level of the max heap answered Apr 24, 2019 User Avatar 1 comment Share Follow See 1 comment

1 1 comment reply

User Avatar 4 4 13 commented Apr 30, 2019 reply Follow flag 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 reply Share

Please log in or register to add a comment.

0 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. answered Jul 11, 2020 User Avatar 1 1 3 comment Share Follow

0 reply

Please log in or register to add a comment.

0 0 votes Smallest Element will be one of the leaf node. answered Sep 9, 2020 User Avatar 2 comment Share Follow

0 reply

Please log in or register to add a comment.

Voting & Accepting an answer helps improve the community ← PreviousNext →← Previous in categoryNext in category →

Related questions

1 1 vote 0 0 answers 386 386 views akash.dinkar12 asked Apr 5, 2019 386 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$ User Avatar akash.dinkar12 386 views akash.dinkar12 asked Apr 5, 2019
  • Algorithms
  • cormen
  • algorithms
  • binary-heap
  • descriptive
+ 0 0 votes 2 2 answers 1.9k 1.9k views akash.dinkar12 asked Apr 5, 2019 1,887 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 ? User Avatar akash.dinkar12 1.9k views akash.dinkar12 asked Apr 5, 2019
  • Algorithms
  • cormen
  • algorithms
  • binary-heap
  • descriptive
+ 0 0 votes 1 1 answer 536 536 views akash.dinkar12 asked Apr 5, 2019 536 views Cormen Edition 3 Exercise 6.1 Question 5 (Page No. 154) Is an array that is in sorted order a min-heap ? User Avatar akash.dinkar12 536 views akash.dinkar12 asked Apr 5, 2019
  • Algorithms
  • data-structures
  • binary-heap
  • cormen
  • descriptive
+ 0 0 votes 0 0 answers 464 464 views akash.dinkar12 asked Jun 27, 2019 464 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 with A[i] 4 A.heapsize=A.heapsize – 1 5 MAX-HEAPIFY(A,1)illustrate the operation of HEAPSORT on... User Avatar akash.dinkar12 464 views akash.dinkar12 asked Jun 27, 2019
  • Algorithms
  • cormen
  • algorithms
  • binary-heap
  • heap-sort
  • descriptive
+ Hide side panel

GATE Overflow Test Series for GATE CSE 2026

Subscribe to GO Classes for GATE CSE 2026

Seach the website Search UI 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

Search For Tags

Match the exact tag

Recent Posts

  • PSU Career Opportunities via GATE 2026
  • Interview Experience: MS by Research in Computer Science – Winter Admission at IIT Madras
  • GATE CSE 2025 Approximate Cut-offs
  • My GATE Journey
  • Admission Process experience of M tech Ra (AI) at IIT Hyderabad

Subjects

  • All categories
  • General Aptitude (4.8k)
  • Engineering Mathematics (13.3k)
  • Digital Logic (4.1k)
  • Programming and DS (7.0k)
  • Algorithms (5.5k)
  • Theory of Computation (7.6k)
  • Compiler Design (2.7k)
  • Operating System (5.8k)
  • Databases (5.5k)
  • CO & Architecture (4.4k)
  • Computer Networks (5.6k)
  • Artificial Intelligence (273)
  • Machine Learning (1.1k)
  • Data Mining and Warehousing (49)
  • Non GATE CSE (2.0k)
  • Others (6.8k)
  • Admissions (723)
  • Exam Queries (1.6k)
  • Tier 1 Placement Questions (18)
  • Job Queries (90)
  • Projects (28)
  • Unknown Category (546)

Site Statistics

79.9k questions

101k answers

280k comments

286k users

Recent Blog Comments

  • Congratulations bro
  • Congratulations !!
  • Yes this was very much needed. Thanks. Also if...
  • Very Very Very much needed Plz keep giving...
  • The college is expected to open on January 5th....
X WhatsApp Facebook Reddit LinkedIn Email Link Copied! Copy

Tag » Where In A Max-heap Might The Smallest Element Reside