B+树 习题解
2016-06-01 17:33
513 查看
B+树是一种n叉树,它将所有数据存在一个level中。B+ 树的特点是能够保持数据稳定有序,其插入与修改拥有较稳定的对数时间复杂度。因此B+树被应用于数据库和操作系统的文件系统中。
B+树的理解没有红黑树这么复杂,本文将首先简要介绍B+树,然后分析B+树的先关题目。本文重点是最后一部分。
(1) The root is either a leaf or has between 2 and M children.
(2) All nonleaf nodes (except the root) have between ⌈M/2⌉ and M children.
(3) All leaves are at the same depth.
Assume each nonroot leaf also has between ⌈M/2⌉ and M children.
需要注意:
每个存储数据的叶节点,其中的数据数量在⌈M/2⌉ 与 M之间(闭区间)。若超出这个区间,则进行调整。
从空树开始时,数据首先存放在根节点中,当根节点的数据大于M时再进行调整。
根的子节点数最小为2, 而其他非根节点的子节点数最小为 ⌈M/2⌉
A. 7 and 8 are in the same node
B. the parent of the node containing 5 has 3 children
C. the first key stored in the root is 6
D. there are 5 leaf nodes
故选A
After deleting 9 from the 2-3 tree given in the figure, which one of the following statements is FALSE? (2分)
A. the root is full
B. the second key stored in
4000
the root is 6
C. 6 and 8 are in the same node
D. 6 and 5 are in the same node
故选D
Which of the following statements concerning a B+ tree of order M is TRUE? (2分)
A. the root always has between 2 and M children
B. not all leaves are at the same depth
C. leaves and nonleaf nodes have some key values in common
D. all nonleaf nodes have between ⌈M/2⌉ and M children
A. 当只有root一个节点时,root没有孩子。故错。
B. 这违反了定义“所有叶节点位于同一深度”。
C. 正确。
D. 除了根节点外的非叶结点有 ⌈M/2⌉ 与 M 之间的子节点。
故选D
B+树的理解没有红黑树这么复杂,本文将首先简要介绍B+树,然后分析B+树的先关题目。本文重点是最后一部分。
介绍
A B+ tree of order M is a tree with the following structural properties:(1) The root is either a leaf or has between 2 and M children.
(2) All nonleaf nodes (except the root) have between ⌈M/2⌉ and M children.
(3) All leaves are at the same depth.
Assume each nonroot leaf also has between ⌈M/2⌉ and M children.
需要注意:
每个存储数据的叶节点,其中的数据数量在⌈M/2⌉ 与 M之间(闭区间)。若超出这个区间,则进行调整。
从空树开始时,数据首先存放在根节点中,当根节点的数据大于M时再进行调整。
根的子节点数最小为2, 而其他非根节点的子节点数最小为 ⌈M/2⌉
相关题目
Insert 3, 1, 4, 5, 9, 2, 6, 8, 7, 0 into an initially empty 2-3 tree (with splitting). Which one of the following statements is FALSE? (2分)A. 7 and 8 are in the same node
B. the parent of the node containing 5 has 3 children
C. the first key stored in the root is 6
D. there are 5 leaf nodes
故选A
After deleting 9 from the 2-3 tree given in the figure, which one of the following statements is FALSE? (2分)
A. the root is full
B. the second key stored in
4000
the root is 6
C. 6 and 8 are in the same node
D. 6 and 5 are in the same node
故选D
Which of the following statements concerning a B+ tree of order M is TRUE? (2分)
A. the root always has between 2 and M children
B. not all leaves are at the same depth
C. leaves and nonleaf nodes have some key values in common
D. all nonleaf nodes have between ⌈M/2⌉ and M children
A. 当只有root一个节点时,root没有孩子。故错。
B. 这违反了定义“所有叶节点位于同一深度”。
C. 正确。
D. 除了根节点外的非叶结点有 ⌈M/2⌉ 与 M 之间的子节点。
故选D
相关文章推荐
- 书评:《算法之美( Algorithms to Live By )》
- 动易2006序列号破解算法公布
- Ruby实现的矩阵连乘算法
- C#插入法排序算法实例分析
- 超大数据量存储常用数据库分表分库算法总结
- C#数据结构与算法揭秘二
- C#冒泡法排序算法实例分析
- 算法练习之从String.indexOf的模拟实现开始
- C#算法之关于大牛生小牛的问题
- C#实现的算24点游戏算法实例分析
- c语言实现的带通配符匹配算法
- 浅析STL中的常用算法
- 算法之排列算法与组合算法详解
- C++实现一维向量旋转算法
- Ruby实现的合并排序算法
- C#折半插入排序算法实现方法
- 基于C++实现的各种内部排序算法汇总
- C++线性时间的排序算法分析
- C++实现汉诺塔算法经典实例
- PHP实现克鲁斯卡尔算法实例解析