Please enable JavaScript.
Coggle requires JavaScript to display documents.
MM7 - Coggle Diagram
MM7
TREES
rooted trees concepts
-
-
-
-
-
-
-
-
-
-
-
height: the lenght of the longest simple path from the root to a leaf; the maximum level of the tree
-
rooted tree: for every two vertices there is always exactly one simple path from one to the other and by selecting an arbitrary vertex as a root it becomes a rooted tree
-
-
binary tree: orderd tree in which all vertices have no more than two children
left / right child
left / right subtree
since all subtrees are also binary, the binary tree can be defined recursively
binary search trees: binary trees in which the left child of a given vertex v is smaller than v and the right child is larger than v
h = height
n = number of nodes (elements on the tree)
log(n) <= h <= n-1
-
-
-
-