且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

完全二叉树和几乎完全二叉树的区别

更新时间:2022-06-15 22:22:31

你的例子是一棵完全二叉树:一棵完全二叉树可以有一个不完整的最后一层,只要它的所有叶子都向左推.

Your example is a complete binary tree: a complete binary tree can have an incomplete last level, as long as all the leaves in it are pushed across to the left.

完美二叉树是最后一层为满的完全二叉树.

A perfect binary tree is a complete binary tree in which the last level is full.

几乎完整的二叉树是完整但不完美的二叉树.所以你的例子也差不多完成了.

An almost complete binary tree is a complete but not perfect binary tree. So your example is also almost complete.

术语令人困惑,但几乎完整的二叉树也是完整的.

The terminology is confusing, but an almost complete binary tree is also complete.