There are some basic properties of binary trees. It is better to know all of them and how to apply.For easier understanding I am giving it in a tabular form.
1. | Maximum number of nodes on any level i is | 2i |
2. | Maximum number of nodes possible in a binary tree of height h is | 2h-1 |
3. | Minimum number of nodes possible in a binary tree of height h is equal to | h |
4. | If a binary tree contains n nodes, then its maximum height possible is | n |
5. | If a binary tree contains n nodes, then its minimum height possible is | log2(n+1) |
6. | In a non empty binary tree, if n is the total number of nodes and e is the total number of edges, then | e=n-1 |
7. | In a full binary tree of height k, there are | 2k-1 internal nodes |
8. | A strictly binary tree with n leaf nodes always has | 2n - 1 nodes |
No comments:
Post a Comment