The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+3 votes
The number of distinct max heap are possible with keys 1, 2, 3, 4, 5 are ________.
asked in DS by Active (2.3k points) | 220 views
Is it 8?
i'm getting 8?

2 Answers

+1 vote

Total ways to arrange data is in 5 nodes is 5!.

Divide it by 5 as we have 5 nodes in descendant in of root including itself. Similarity 3 in root left child as we have 3 descendant for it including itself.

Source : 

answered by Loyal (9.1k points)
0 votes

Ans is 8

answered by Junior (627 points)
You sure, this is a correct approach, Bhai @OO7?
I solve most of the questions of this type with this approach and they satisfy with the given answers @iarnav
Okay! :)

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
49,576 questions
54,192 answers
71,147 users