[树] 定义&概念
定义&概念
定义
- 根节点唯一
- 子树不相交
- recursive data structure
参数
- 度
树的度
- 层次:
- 深度:Depth of x
Length of path from root to x
or
No. of edges in path from root to n - 高度:Height of x
No. of edges in longest path form x to a leaf

- 树的高度:Height of root node
- 有序&无序
关系
- Child
- Parent
- Sibling
- ancestor
- descendent
- cousin

浙公网安备 33010602011771号