Assume:
- let T = nonempty binary tree
- let n = number of nodes
- let n_e = number of external nodes
- let n_i = number of internal nodes
- let h = height of T
Then, T has following properties:
- height of the nonempty binary tree + 1 is less than or equal to the number of nodes in the binary tree is less than or equal to 2^(height of the nonempty binary tree + 1) — 1
- 1 is less than or equal to number of external nodes in the nonempty binary tree is less than or equal to 2^(height of the nonempty binary tree)
- height of the nonempty binary tree is less than or equal to number of internal nodes of the nonempty binary tree is less than or equal to 2^(height of nonempty binary tree) — 1
- log of (number of nodes in nonempty binary tree) — 1 is less than or equal to height of the nonempty binary tree is less than or equal to number of nodes in nonempty binary tree — 1
… sorry this was one was also not finished :’-(
for context plan was to illustrate this using 3djs
See you next time