in Programming in C
713 views
1 vote
1 vote

in Programming in C
by
713 views

7 Comments

If starting node is root then i am getting 128..
0
0
plz elaborate
0
0
Is it correct?
0
0

@MiNiPanda

in the question they didn't mention, no.of nodes in the BST

For getting maximum, did you consider it is Perfect BST?

0
0
Yes as they wanted maximum so we should consider perfect BST
0
0
@MiniPanda

Can you please explain your solution.

As I couldn't solve.

Thanks
0
0
@Mayankprakash
See the answer in this post.. if you have doubt then ask.
0
0

1 Answer

2 votes
2 votes
Best answer
for Maximum result we take Perfect Binary Search Tree

If we take complete  binary tree of height = 3

no of internal nodes = 7

Each internal node has 2 choices

therefore  , max No of BFS traversal  = 2^7
edited by
by

4 Comments

@Magma: Not getting your solution...can you explain it with example...
0
0

Shaik Masthan

Can u give me some link where the definition of a complete binary tree or perfect binary tree or almost Complete binary tree or full tree are given ??

0
0