Update README.md

This commit is contained in:
bt3gl 2023-07-29 20:48:55 -07:00 committed by GitHub
parent 2d481f78b0
commit 93b3587bca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,20 @@
<br>
### trees
<br>
* a node is called **leaf** if has no children.
* **binary trees**: each node has up to 2 children.
* **binary search tree**: all nodes on the left are smaller than the root, which is smaller than all nodes on the right.
* if the bst is **balanced**, it guarantees O(log(n)) for insert and search.
* common types of balanced trees: **red-black** and **avl**.
* a **complete tree** is a tree on which every level is fully filled (except perhaps for the last).
* a **full binary tree** has each node with either zero or two children (and no node has only one child).
* a **perfect tree** is both full and complete (it must have exactly 2**k - 1 nodes, where k is the number of levels).
<br>
---