AVL树的右旋html
AVL树的右左旋git
问题1:.红黑树从任一节点到其每一个叶子的全部路径都包含相同数目的黑色节点这句话怎么理解?中间的状况是否与这句话有出入?算法
问题1解决方案:这有个条件:确保没有一条路径会比其余路径长出俩倍数组
问题2解决方案:在红黑树的删除算法中,有这么一种状况
这种状况下,S的左孩子与右孩子必为NIL,不然原来的红黑树就不平衡.
那么在对P的向上递归过程当中,也会出现这种状况,即对应的S及S的孩子全为黑色.
NIL结点的意义就在于:向上递归的过程当中识别出这种状况数据结构
无less
There are four basic methods for traversing a tree: preorder, inorder, postorder, and level-order.post
B . Top down, inorder, postorder, and level-order学习
C . Bottom up, preorder, in order, and postorder.net
D . preorder, inorder, postorder, and level-order
选D,看错设计
The simulated link strategy does not allow array positions to be allocated contiguously regardless of the completeness of the tree.
A . True
B . False
选B,模拟连接策略容许连续分配数组位置而不用考虑该树的彻底性。
In general, a balanced n-ary tree with m elements will have height lognm.
A . True
B . False
选A,具备m个元素的平衡n元树的高度为lognm
代码行数(新增/累积) | 博客量(新增/累积) | 学习时间(新增/累积) | 重要成长 | |
---|---|---|---|---|
目标 | 5000行 | 30篇 | 400小时 | |
第一周 | 0/0 | 1/1 | 8/8 | |
第二周 | 500/500 | 1/2 | 15/ 23 | |
第三周 | 802/1302 | 1/3 | 12/35 | |
第四周 | 1530/2832 | 2/5 | 15/50 | |
第五周 | 1165/3997 | 1/6 | 10/60 | |
第六周 | 1169/5166 | 1/7 | 15/75 | |
第七周 | 843/6039 | 1/8 | 15/90 |