“完全二叉树”,“严格二叉树”,“完全二进制树”之间的区别 [英] Difference between "Complete binary tree", "strict binary tree","full binary Tree"?

查看:452
本文介绍了“完全二叉树”,“严格二叉树”,“完全二进制树”之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对以下树木的术语感到困惑,我一直在研究树,并且无法区分树木:



a)完整的二叉树



b)严格二进制树



c)完整的二进制树



请帮助我区分这些树。
数据结构中使用这些树的时间和地点?

解决方案



或严格二叉树)是一棵树,除了叶子之外的每个节点都有两个孩子。



所以你没有只有1个孩子的节点。看起来和严格的二叉树一样。



这是一个完整/严格的二叉树的图像,来自谷歌:





完整的二叉树是一个二叉树,其中每个级别(可能是最后一个)都是完全填充的,所有节点都尽可能地最左边。



这似乎意味着一个平衡的树。



这是一个完整的二叉树的图像,从谷歌,全部树的部分图像是奖金。




I am confused about the terminology of the below trees, I have been studying the Tree, and didn't able to distinguish between there 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?

解决方案

Wikipedia yielded

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.

这篇关于“完全二叉树”,“严格二叉树”,“完全二进制树”之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆