# YOU CAN DOWNLOAD 200+ SUBJECTS PDF BOOK FOR COMPETITIVE EXAMINATIONS

## 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?

AVL tree | |

B-tree | |

Red-black tree | |

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 .....

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.

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.

255 | |

63 | |

127 | |

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 = ( m

^{h+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?

14 | |

7 | |

11 | |

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.

True | |

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.