B-Tree Multiple choice Questions and Answers (MCQs)
Click on any option to know the CORRECT ANSWERS
Which of the following is the most widely used external memory data structure?
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.
B-tree of order n is a order-n multiway tree in which each non-root node contains .....
at most (n - 1)/2 keys
exact (n - 1)/2 keys
at least 2n keys
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.
A B-tree of order 4 and of height 3 will have a maximum of ..... keys.
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.
Five node splitting operations occurred when an entry is inserted into a B-tree. Then how many nodes are written?
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.
B-tree and AVL tree have the same worst case time complexity for insertion and deletion.
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.