Basic knowledge about binary trees
2016-03-29 10:50
316 查看
Difference between complete binary tree and full binary tree:
Actually, full binary tree is a special form of complete binary tree. Complete tree satisfies that all the nodes except the nodes at (h-1) level and h level are fully connected. Full binary tree satisfies that all the nodes expect the nodes at h level are
fully connected.
满二叉树是完全二叉树的特例,因为满二叉树已经满了,而完全并不代表满。所以形态你也应该想象出来了吧,满指的是出了叶子节点外每个节点都有两个孩子,而完全的含义则是最后一层没有满,并没有满。
What is balanced binary tree?
平衡二叉树(Balanced Binary Tree)又被称为AVL树(有别于AVL算法),且具有以下性质:它是一棵空树或它的左右两个子树的高度差的绝对值不超过1,并且左右两个子树都是一棵平衡二叉树。
There are several commonly saw balanced binary trees like Red-Black Tree and AVL tree. 红黑树(英语:Red–black tree)是一种自平衡二叉查找树,是在计算机科学中用到的一种数据结构,典型的用途是实现关联数组。它是复杂的,但它的操作有着良好的最坏情况运行时间,并且在实践中是高效的:它可以在O(log n)时间内做查找,插入和删除,这里的n是树中元素的数目。
AVL在计算机科学中是最先发明的自平衡二叉查找树。
Actually, full binary tree is a special form of complete binary tree. Complete tree satisfies that all the nodes except the nodes at (h-1) level and h level are fully connected. Full binary tree satisfies that all the nodes expect the nodes at h level are
fully connected.
满二叉树是完全二叉树的特例,因为满二叉树已经满了,而完全并不代表满。所以形态你也应该想象出来了吧,满指的是出了叶子节点外每个节点都有两个孩子,而完全的含义则是最后一层没有满,并没有满。
What is balanced binary tree?
平衡二叉树(Balanced Binary Tree)又被称为AVL树(有别于AVL算法),且具有以下性质:它是一棵空树或它的左右两个子树的高度差的绝对值不超过1,并且左右两个子树都是一棵平衡二叉树。
There are several commonly saw balanced binary trees like Red-Black Tree and AVL tree. 红黑树(英语:Red–black tree)是一种自平衡二叉查找树,是在计算机科学中用到的一种数据结构,典型的用途是实现关联数组。它是复杂的,但它的操作有着良好的最坏情况运行时间,并且在实践中是高效的:它可以在O(log n)时间内做查找,插入和删除,这里的n是树中元素的数目。
AVL在计算机科学中是最先发明的自平衡二叉查找树。
相关文章推荐
- Basic knowledge about binary trees
- 2013 Office Word 编辑常用功能
- SpringMVC测试
- idea2016.1 使用Kotlin + Gradle 创建工程
- FieldRetrievingFactoryBean
- express插件之body-parser
- 使用pods添加第三方的时候,出现ld: library not found for -lpop
- 80. Remove Duplicates from Sorted Array II
- Android——Volley学习
- Opencv + Qt (linux, build with qt)
- Liux常用命令和caffe 常用命令
- IOS UIToolBar
- linux下mail命令发送邮件
- MySql事务详解
- iOS Block 写法详解
- Swift - String与NSString的区别,以及各自的使用场景
- java缓存框架详解
- Web前端开发规范文档
- 2017
- SQLite