5. B-Tree

Beschreibung

Algorithms and Data Structures | Test 3 Review | CSCI-3110-002 MTSU
Mena Sargios
Quiz von Mena Sargios, aktualisiert more than 1 year ago
Mena Sargios
Erstellt von Mena Sargios vor etwa 8 Jahre
652
0

Zusammenfassung der Ressource

Frage 1

Frage
What are b-tree's optimized for in comparison to binary search trees?
Antworten
  • Binary search tree's have a very long height and they aren't made for massive blocks of data whereas b-tree's are optimized for systems reading and writing large blocks of data and is best utilized when it is written to external memory sources or disk.
  • none of the above

Frage 2

Frage
You hired to create a database for a large corporation. Your employeers want you to organize their data in a tree data structure. Which is an appropriate tree data structure?
Antworten
  • A) AVL Tree
  • B) 2-3 Tree
  • C) B-Tree
  • D) Red/Black Tree

Frage 3

Frage
What makes a b-tree seperate from a binary tree?
Antworten
  • Each node can have multiple elements of (n) with children of (n+1)
  • none of the above

Frage 4

Frage
Which one of the following is a key factor for preferring B-trees to binary search trees for indexing database relations?
Antworten
  • A.Database relations have a large number of records
  • B.Database relations are sorted on the primary key
  • C.B-trees require less memory than binary search trees
  • D.Data transfer form disks is in blocks

Frage 5

Frage
What are B-tree's optimized to do?
Antworten
  • Readn and write large blocks of data
  • none of the above

Frage 6

Frage
B-Tree is a self-balancing search tree.
Antworten
  • True
  • False

Frage 7

Frage
in a binary search tree, a node can have up to ______ children, while in a 2-3 tree it can have up to ________ children, and in a 2-3-4 tree a node can have up to _____ chidlren?
Antworten
  • A.2, 2, 2
  • B.2, 1, 3
  • C.2, 3, 4
  • D.2, 4, 1

Frage 8

Frage
Which of the following is true of B-trees?
Antworten
  • a. The data items are stored at leaves.
  • b. The nonleaf nodes store up to M-1 keys to guide the searching.
  • c. The root is either a leaf or has between two and M children.
  • d. All of these are true!

Frage 9

Frage
What is the worst case search time for a B-Tree?
Antworten
  • A) O(n^2)
  • B) O(n log n)
  • C) O(log n)
  • D) O(n)

Frage 10

Frage
The B-tree:
Antworten
  • a. Keeps values balanced with a sorting algorithm
  • b. uses partially full blocks to speed insertions and deletions
  • c. keys are in sorted order for reverse sequential traversing
  • d. None of the above

Frage 11

Frage
Which of the following are B-Trees?
Antworten
  • A. 2-3 Tree
  • B. 2-3-4 Tree
  • C. Red-Black Tree
  • D. A and B

Frage 12

Frage
What is a B-Tree?
Antworten
  • A) A tree with only right children
  • B) A tree with only left children
  • C) A tree in which a node can have more than two children
  • D) None

Frage 13

Frage
Which of the following is TRUE about B-Trees?
Antworten
  • A. B-trees aim to have the largest tree height possible
  • B. if a B-tree has M children, each node will hold (M + 1) keys
  • C. the max number of children is not user-defined
  • D. if a B-tree has M children, each node will hold (M - 1) keys

Frage 14

Frage
Which of the following is correct about B-trees?
Antworten
  • A. A B-tree is a tree data structure that does not sort data or allow searches, insertions, and deletions in logarithmic amortized time.
  • B. A B-tree is a tree data structure that cannot keep data sorted or allow searches, insertions, and deletions in logarithmic amortized time.
  • C. A B-tree is a tree data structure that keeps data sorted and allows searches, insertions, and deletions in logarithmic amortized time.
  • D. A B-tree is a tree data structure that rewrites data and fails to sort or allow searches, insertions, and deletions in logarithmic amortized time.

Frage 15

Frage
When talking about a B tree the number of children does NOT need to be greater than the number of the branching factor.
Antworten
  • True
  • False

Frage 16

Frage
The B-tree is a generalization of a binary search tree in that a node can have more than two children According to Knuth's definition, Which is not correct the following properties of B-tree of order m?
Antworten
  • a. Every node has at most m children. All leaves appear in the same level
  • b. Every non-leaf node (except root) has at least ?m/2? children.
  • c. The root has at least two children if it is not a leaf node.
  • d. All leaves don't need to appear in the same level

Frage 17

Frage
which one is not right about the B tree?
Antworten
  • A. one node in a B tree can has a variable number of child nodes.
  • B. Red_black trees B-trees of order 2.
  • C. 2–3 trees are B-trees of order 3.
  • D. 2–3–4 trees are B-trees of order 4.

Frage 18

Frage
In a B-tree how many children will each nonleaf node have (excluding root) ?
Antworten
  • A) M/2 rounded down
  • B) M-1
  • C) M/2 rounded up
  • D) M+1
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

2. Red Black Tree
Mena Sargios
12. Graph Traversal
Mena Sargios
7. Algorithm Growth Rate
Mena Sargios
3. 2-3 Tree
Mena Sargios
16. Greedy Algorithm (Huffman code)
Mena Sargios
4. 2-3-4 Tree
Mena Sargios
10. Hashing Collision
Mena Sargios
14. Graph Shrtest Path
Mena Sargios
1. Trees Splay Trees
Mena Sargios
15. Graph Spanning Tree
Mena Sargios
13. Graph Topoligical Sorting
Mena Sargios