【DataStrcutre】Introduction and description of Binary Trees

来源:互联网 发布:怎么进淘宝卖家中心 编辑:程序博客网 时间:2024/06/07 09:16

[Definitions]

Here is the recursive definition of a binary tree:

A binary tree is either the empty set or a triple T = (x,L,R), where x is a node and L and R are disjoint binary trees, neither of which contains. 

The node x is called the root of the tree T, and the subtrees L and R are called the left subtree and the right subtree of T rooted at x. 

Here is an equivalent, nonerecursive defination for binary trees:

A binay tree is an ordered tree in which every internal node has degree 2. 

Full Binary Trees

A binary tree is said to be full if itls leaves are at the same level and every interior node has two children. 








0 0
原创粉丝点击