# B-Tree Multiple choice Questions and Answers (MCQs)

## B-Tree Multiple choice Questions and Answers (MCQs)

 Question 1 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the following is the most widely used external memory data structure?
 A AVL tree B B-tree C Red-black tree D Both AVL tree and Red-black tree
Question 1 Explanation:
In external memory, the data is transferred in form of blocks. These blocks have data valued and pointers. And B-tree can hold both the data values and pointers. So B-tree is used as an external memory data structure.

 Question 2 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
B-tree of order n is a order-n multiway tree in which each non-root node contains .....
 A at most (n - 1)/2 keys B exact (n - 1)/2 keys C at least 2n keys D at least (n - 1)/2 keys
Question 2 Explanation:
A non-root node in a B-tree of order n contains at least (n - 1)/2 keys. And contains a maximum of (n - 1) keys and n sons.

 Question 3 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
A B-tree of order 4 and of height 3 will have a maximum of ..... keys.
 A 255 B 63 C 127 D 188
Question 3 Explanation:
A B-tree of order m of height h will have the maximum number of keys when all nodes are completely filled. So, the B-tree will have n = ( mh+1 - 1) keys in this situation. So, required number of maximum keys = 43+1 - 1 = 256 - 1 = 255.

 Question 4 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Five node splitting operations occurred when an entry is inserted into a B-tree. Then how many nodes are written?
 A 14 B 7 C 11 D 5
Question 4 Explanation:
If s splits occur in a B-tree, 2s + 1 nodes are written (2 halves of each split and the parent of the last node split). So, if 5 splits occurred, then 2 * 5 + 1, i.e. 11 nodes are written.

 Question 5 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
B-tree and AVL tree have the same worst case time complexity for insertion and deletion.
 A True B False
Question 5 Explanation:
Both the B-tree and the AVL tree have O(log n) as worst case time complexity for insertion and deletion.

There are 5 questions to complete.