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
Introduction to Alogrithm
Overflow04
asked
in
DS
Jun 29, 2022
recategorized
Jul 7, 2022
by
Lakshman Patel RJIT
119
views
0
votes
0
votes
Number of max heap possible with n distinct keys.
data-structures
binary-heap
Overflow04
asked
in
DS
Jun 29, 2022
recategorized
Jul 7, 2022
by
Lakshman Patel RJIT
by
Overflow04
119
views
answer
comment
Follow
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
0
votes
0
votes
Number of max/min heaps possible with n distinct keys is given by the recurrence relation
$f(n) = {n-1 \choose l} * f(l) * f(r)$
where $l$ is the number of nodes in the left sub-tree.
Note: $f(1) = 1$ and $f(2) = 1$
Aditya_
answered
Jun 30, 2022
by
Aditya_
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
0
votes
0
votes
1
answer
1
Shyam Singh 1
asked
in
DS
May 17, 2016
668
views
introduction to algorithm 6.2.3 exercise question
$6.2-3$ What is the effect of calling MAX-HEAPIFY(A,i) when the element A[i] is larger that its children?
Shyam Singh 1
asked
in
DS
May 17, 2016
by
Shyam Singh 1
668
views
data-structures
binary-heap
descriptive
2
votes
2
votes
1
answer
2
Thor-o-s
asked
in
DS
Sep 1, 2022
145
views
Algorithm which uses Max heap to find i smallest elements
Can anyone please explain how to find “ i “ smallest elements from an array whose elements are distinct Please use max heap to explain the working input : n distinct elements output : i smallest elements
Thor-o-s
asked
in
DS
Sep 1, 2022
by
Thor-o-s
145
views
algorithms
binary-heap
data-structures
0
votes
0
votes
1
answer
3
sripo
asked
in
DS
Nov 8, 2018
415
views
How to understand difference between n/2 and log(n) when comes to operations on a binary tree
For a heap containing n elements,smallest element can be found in n/2 operations.I always get confused and think as logn operations.Please help me differentiating between these two times.
sripo
asked
in
DS
Nov 8, 2018
by
sripo
415
views
data-structures
binary-tree
heap
binary-heap
4
votes
4
votes
1
answer
4
Gaurab Ghosh
asked
in
DS
Jan 18, 2017
1,160
views
Time to build a heap
If you are given a sorted list with n elements in ascending order. Then what will be the Time complexity to build a Min heap from the given array?
Gaurab Ghosh
asked
in
DS
Jan 18, 2017
by
Gaurab Ghosh
1.2k
views
data-structures
binary-heap
time-complexity
Subscribe to GATE CSE 2023 Test Series
Subscribe to GO Classes for GATE CSE 2023
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
From Rank 4200 to 64: My Journey to Success in GATE CSE Exam
What are the key things to focus on during the final 10-15 days before the GATE exam to improve performance?
All India GO Classes Mock test
NTA UGC NET JRF December 2022 Apply Online Form 2023
Life happens, just chill and do hardwork
Subjects
All categories
General Aptitude
(2.5k)
Engineering Mathematics
(9.3k)
Digital Logic
(3.3k)
Programming and DS
(5.8k)
Programming
(3.9k)
DS
(1.9k)
Algorithms
(4.6k)
Theory of Computation
(6.7k)
Compiler Design
(2.3k)
Operating System
(5.0k)
Databases
(4.6k)
CO and Architecture
(3.8k)
Computer Networks
(4.6k)
Non GATE
(1.3k)
Others
(2.4k)
Admissions
(649)
Exam Queries
(842)
Tier 1 Placement Questions
(17)
Job Queries
(74)
Projects
(9)
Unknown Category
(853)
Recent Blog Comments
Eligibility Criteria: Discipline of...
4-year B.Tech./B.E. degree or a MSc./MCA degree...
I am not sure about others but I would pay 2X...
@DebRC Yes. This, time stamp and comparing...
Small feedback for next year. It would be great...
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy