The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
152 views

Total number of ordering possible with 12,10,8,5,3,2,1,7,9 such that if node of the below graph is filled with given elements , such that it satisfy MAX-Heap property

How to solve such question accurately

  • 🚩 Duplicate | 👮 Satbir | 💬 “https://gateoverflow.in/199006/max-heap-counting”
asked in Programming & DS by Loyal (6.4k points) 1 flag | 152 views
0
I got 200

what's the answer given ?
0
896
0
i m getting 224 ?
+6

$\frac{9!}{9*5*3*3*1*1*1*1*1}=896$

follow this he derived this formula beautifully. 

+1

@Shubhgupta

Can you share exact time in video its 1hr video

0
just play brother it will play from that point only and watch from 40:00.
0

@ShubhguptaBut why isn't 2018 question following this logic as for that also we could have only 1 structure but the ans for it is 80

 

0

just check the beautiful explanation by KAPIL sir https://gateoverflow.in/102171

if you have still doubt then comment !

+1

@Markzuck

it is working for 2018 examples also they asked # of min heaps ..so we have to consider CBT structure with 7 nodes

                    O

           O                  O

O                O   O                O

7! / 7*3*3*1*1*1*1 = 80

0
@Shaik Masthan sir,
So is Kapil sirs solution always results same as the above logic?
Means write n!/ N1*n2 and so on
Means dividing with the product of all the size of each node subtree?
0
0
just wow for this guy

Please log in or register to answer this question.

Related questions

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
48,725 questions
52,831 answers
183,519 comments
68,657 users