更新时间:2022-10-17 17:49:50
全二叉树(有时是正二叉树或二叉树或严格二叉树)是一棵树,其中除叶子之外的每个节点都有两个孩子.
所以你没有只有 1 个孩子的节点.看起来和严格二叉树一样.
这是一个完整/严格二叉树的图像,来自谷歌:
完全二叉树是一种二叉树,其中每一层(可能除了最后一层)都被完全填充,并且所有节点都尽可能地向左.
这似乎意味着一个平衡的树.
这是一个完整的二叉树的图片,来自谷歌,图片的完整树部分是额外的.
I am confused about the terminology of the below trees, I have been studying the Tree, and I am unable to distinguish between these trees:
a) Complete Binary Tree
b) Strict Binary Tree
c) Full Binary Tree
Please help me to differentiate among these trees. When and where these trees are used in Data Structure?
A full binary tree (sometimes proper binary tree or 2-tree or strictly binary tree) is a tree in which every node other than the leaves has two children.
So you have no nodes with only 1 child. Appears to be the same as strict binary tree.
Here is an image of a full/strict binary tree, from google:
A complete binary tree is a binary tree in which every level, except possibly the last, is completely filled, and all nodes are as far left as possible.
It seems to mean a balanced tree.
Here is an image of a complete binary tree, from google, full tree part of image is bonus.