8
if u assign a 0th level to root of binary tree then,the minimum no. of nodes for depth K is k+1.
3
A full binary tree of depth 3 has at least 4 nodes. That is; 1 root, 2 children and at least 1 grandchild. The maximum is 7 nodes (4 grandchildren).
Use the following formula: (2^n)-1. E.g., if the depth is 3, the number of nodes is (2^3)-1 = 8-1 = 7. Note that 7 is the maximum number of nodes, not the actual number of nodes. To count the actual nodes you must traverse the tree, updating an accumulator as you go.
Minimum is h nodes (Maximum is 2h+1 - 1 nodes, if tree consisting of only one node is considered to have height of 0. if you consider a tree with one node to be a height of one, then the minimum nodes is (2^(h-1)) 1 nodes. Minimum number of nodes in a binary tree of height is 2h+1. For example, if the height of the binary tree is 3, minimum number of nodes is 2*3+1=7.
if u assign a 0th level to root of binary tree then,the minimum no. of nodes for depth K is k+1.
3
A full binary tree of depth 3 has at least 4 nodes. That is; 1 root, 2 children and at least 1 grandchild. The maximum is 7 nodes (4 grandchildren).
Use the following formula: (2^n)-1. E.g., if the depth is 3, the number of nodes is (2^3)-1 = 8-1 = 7. Note that 7 is the maximum number of nodes, not the actual number of nodes. To count the actual nodes you must traverse the tree, updating an accumulator as you go.
In a binary tree, each level can have a maximum of (2^n) nodes, where (n) is the level number starting from 0. For a binary tree with 3 levels (0, 1, 2), the minimum number of nodes occurs when each level has at least one node. Therefore, the minimum number of nodes is 1 (at level 0) + 1 (at level 1) + 1 (at level 2) = 3 nodes.
Minimum is h nodes (Maximum is 2h+1 - 1 nodes, if tree consisting of only one node is considered to have height of 0. if you consider a tree with one node to be a height of one, then the minimum nodes is (2^(h-1)) 1 nodes. Minimum number of nodes in a binary tree of height is 2h+1. For example, if the height of the binary tree is 3, minimum number of nodes is 2*3+1=7.
11
Complete Binary tree: -All leaf nodes are found at the tree depth level -All nodes(non-leaf) have two children Strictly Binary tree: -Nodes can have 0 or 2 children
h+1
Complete Binary tree: All leaf nodes are found at the tree depth level and All non-leaf nodes have two children. Extended Binary tree: Nodes can have either 0 or 2 children.
2^(d+1) - 1
The maximum height of a binary tree with 'n' nodes is 'n-1'.