數據結構與算法(周測9-B樹與B+樹)


由於博主太菜,題目集還不完整,有待更新。

判斷題

1.m階B樹的根結點最多有m棵子樹。

     T      F

2.In a B+ tree, leaves and nonleaf nodes have some key values in common.

     T      F

3.A 2-3 tree with 12 leaves may have at most 10 nonleaf nodes.

     T      F

選擇題

1.下列敘述中,不符合m階B樹定義要求的是:

     A.葉結點之間通過指針鏈接
     B.根結點最多有m棵子樹
     C.所有葉結點都在同一層上
     D.各結點內關鍵字均升序或降序排列

2.Among the following statements, which one does NOT satisfy the definition of a B tree of order m?

     A.All the leaf nodes are linked by pointers
     B.The root has at most m subtrees
     C.All the leaf nodes are on the same level
     D.Inside each node, the keys are arranged in sorted order

3.B+樹不同於B樹的特點之一是:

     A.能支持順序查找
     B.結點中含有關鍵字
     C.根結點至少有兩個分支
     D.所有葉結點都在同一層上

4.After deleting 9 from the 2-3 tree given in the figure, which one of the following statements is FALSE?

     A.the root is full
     B.the second key stored in the root is 6
     C.6 and 8 are in the same node
     D.6 and 5 are in the same node

5.Which of the following statements concerning a B+ tree of order M is TRUE?

     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

6.下列關於M階B+樹的說法,哪一句是對的?

     A.根結點一定有2到M個孩子
     B.不是所有的葉結點都有同樣的深度
     C.葉結點和非葉結點中存的有一些鍵值是一樣的
     D.所有非葉結點都有⌈M/2⌉到M個孩子

10.Which one of the following is NOT true about B+ trees and AVL trees: they are both __。

     A.balanced binary trees
     B.fit for sequential searches
     C.fit for random searches
     D.fit for range searches

13.高度為 5 的 3 階 B 樹含有的關鍵字個數至少是:

     A.15
     B.31
     C.62
     D.242

14.The minimum number of keys in a B tree with order 3 and height 5 is __.

     A.15
     B.31
     C.62
     D.242

15.After inserting 0 into the 2-3 tree given in the figure, how many of the following statements are FALSE?

  • (S1) The tree grows higher;
  • (S2) 2 and 4 are in the same interior node;
  • (S3) the root node still contains 9 only;
  • (S4) the interior node containing 12 keeps unchanged.
     A.0
     B.1
     C.2
     D.3

16.在圖中給定的 2-3 樹中插入 0,以下描述有幾句是錯誤的?

  • (S1) 樹變高了;
  • (S2) 2 和 4 在同一個內部結點里;
  • (S3) 根結點仍然只包含 9;
  • (S4) 包含 12 的那個內部結點沒有改變。
     A.0
     B.1
     C.2
     D.3

17.下面關於B-和B+樹的敘述中,不正確的是( )。

     A.B-樹和B+樹都是平衡的多叉樹
     B.B-樹和B+樹都可用於文件的索引結構
     C.B-樹和B+樹都能有效地支持順序檢索
     D.B-樹和B+樹都能有效地支持隨機檢索

18.m階B-樹是一棵( )。

     A.m叉排序樹
     B.m叉平衡排序樹
     C.m-1叉平衡排序樹
     D.m+1叉平衡排序樹

19.To sort N records by merge sort, the worst-case time complexity is:

     A.O(logN)
     B.O(N)
     C.O(NlogN)
     D.O(N 2)

20.To sort N records by merge sort, the space complexity is:

     A.O(logN)
     B.O(N)
     C.O(NlogN)
     D.O(N 2)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM