recategorized by
1 flag 101,246 views
1 votes
1 votes

Level of a node is distance from root to that node. For example, level of root is 1 and levels of left and right children of root is 2. The maximum number of nodes on level i of a binary tree is 

In the following answers, the operator '^' indicates power

a) 2^i-1
b)2^i
c)2^i+1
d)2^(i+1/2)
  • 🚩 Edit necessary | 👮 Zemansky | 💬 “instead of "the number of node on the level i" of , according to the accepted answer, it should be maximul number of nodes in the tree having i levels”
recategorized by
1 flag

7 Answers

0 votes
0 votes

The answer will be 2^(i-1) not 2^i-1 because here they have asked for the No.Of Nodes in level i not the total Number of nodes at all the levels combined.

If the level of the root is 1 then then at level 2 there will be 2^(2-1) = 2 Nodes.Similarly at level 3 there will be 2^(3-1) = 4 nodes.And so on..

Hence the No of Nodes at level i will be 2^(i-1) instead of 2^i-1.

0 votes
0 votes

 

The maximum number of nodes on level i of a binary tree is 2^(i-1). This is because each node can have two children, and the number of nodes doubles with each additional level.

0 votes
0 votes
The maximum number of nodes on level i of a binary tree is 2^(i-1). This is because each level in a binary tree doubles the number of nodes from the previous level. For example, the root of a binary tree is at level 1 and has 1 node, the next level (level 2) has 2 nodes (left and right children of the root), the next level (level 3) has 4 nodes (left and right children of the left and right children of the root), and so on.

Related questions

0 votes
0 votes
5 answers
1
radha gogia asked Sep 30, 2015
1,604 views
If I am given an array $X$ of $n$ distinct integers which is interpreted as a complete binary tree, so if the parent is at index $i$, then it's left child would be at ind...
0 votes
0 votes
2 answers
2
sripo asked Dec 25, 2018
4,674 views
In a 3-array tree if internal nodes have exactly 3 children,the number of leaf nodes will be __ ?Does it vary for binary tree?What do you mean by internal nodes? Non roo...
2 votes
2 votes
1 answer
3
vijaycs asked May 25, 2016
12,718 views
4 votes
4 votes
1 answer
4
Shashank Chavan asked Jan 18, 2016
11,125 views
What's the difference between Binary tree height, level and depth? Sometimes it's confusing!Does there definition change according to question also, if mentioned?