Which of the following is true?

Category: QuestionsWhich of the following is true?
Editor">Editor Staff asked 4 weeks ago

Which of the following is true?
 
(a) B + tree allows only the rapid random access
 
(b) B + tree allows only the rapid sequential access
 
(c) B + tree allows rapid random access as well as rapid sequential access
 
(d) B + tree allows rapid random access and slower sequential access
 
Question is from B-Trees in chapter B-Trees of Data Structures & Algorithms I
 
The question was posed to me during an interview.

1 Answers
Editor">Editor Staff answered 4 weeks ago

Right answer is (c) B + tree allows rapid random access as well as rapid sequential access
 
Easiest explanation – The B+ -tree being a variation of B-tree allows rapid random access. In a B+ -tree the leaves are linked together, so it also provides rapid sequential access.