正在加载图片...
Preliminaries From the recursive definition,we find that a tree is a collection of nodes,one of which is the root,and /1 edges.That there are /1 edges follows from the fact that each edge connects some node to its parent,and every node except the root has one parent. A The root is A. Node Fhas A as a parent and I,Jas children. Each node may have an arbitrary B E number of children,possibly zero. Nodes with no children are known as leaves. H I J Nodes with the same parent are siblings. Grandparent and grandchild K relations can be defined in a similar manner.Preliminaries ◼ From the recursive definition, we find that a tree is a collection of N nodes, one of which is the root, and N-1 edges. That there are N-1 edges follows from the fact that each edge connects some node to its parent, and every node except the root has one parent. A B C D E F G H I J K L ◼ The root is A. ◼ Node E has A as a parent and I, J as children. ◼ Each node may have an arbitrary number of children, possibly zero. ◼ Nodes with no children are known as leaves. ◼ Nodes with the same parent are siblings. ◼ Grandparent and grandchild relations can be defined in a similar manner
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有