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,229 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 351 681 873 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 389 389 views akash.dinkar12 asked Apr 5, 2019 389 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 389 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,899 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 551 551 views akash.dinkar12 asked Apr 5, 2019 551 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 551 views akash.dinkar12 asked Apr 5, 2019
  • Algorithms
  • data-structures
  • binary-heap
  • cormen
  • descriptive
+ 0 0 votes 0 0 answers 472 472 views akash.dinkar12 asked Jun 27, 2019 472 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 472 views akash.dinkar12 asked Jun 27, 2019
  • Algorithms
  • cormen
  • algorithms
  • binary-heap
  • heap-sort
  • descriptive
+ 📢 Notice Board Points you should be aware before the exam GATE Overflow Test Series GO Test Series 2026 Purchase link is live now Subscribe to GO Classes for GATE CSE 2026 Online coaching classes by Sachin & Deepak GATE Overflow Timeline Visual history of GO’s journey GATE Overflow FAQ Read about GATE Overflow and how to use it. Hide side panel 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

  • My Journey: Gate Aspirant to IIT Bombay and Microsoft Engineer
  • TRAI Recruitment of Technical Officer through GATE 2023/2024/2025 Scores
  • BARC Recruitment of Scientific Officers through GATE Score / Online Exam 2026
  • Introducing Random Quiz / Exam
  • PSU Career Opportunities via GATE 2026

Subjects

  • All categories
  • General Aptitude (4.9k)
  • Engineering Mathematics (13.4k)
  • Digital Logic (4.2k)
  • Programming and DS (7.2k)
  • Algorithms (5.5k)
  • Theory of Computation (7.6k)
  • Compiler Design (2.8k)
  • Operating System (5.9k)
  • Databases (5.5k)
  • CO & Architecture (4.4k)
  • Computer Networks (5.6k)
  • Artificial Intelligence (290)
  • 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 (547)

Site Statistics

80.5k questions

102k answers

284k comments

290k users

Recent Blog Comments

  • It will not immediately done. But, can you breif...
  • @Shaik Masthan sir i don't know where to ask...
  • Indeed.
  • Sir, by Sachin air 33 you mean Sachin sir of @GO...
  • inspiring, much-needed !!
X WhatsApp Facebook Reddit LinkedIn Email Link Copied! Copy

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