Pervious Year question: B Tree | Programming and Data Structures - Computer Science Engineering (CSE) PDF Download

Q1: A B-tree of order 4 is built from scratch by 10 successive insertions. What is the maximum number of node splitting operations that may take place?  (2008)
(a) 3
(b) 4
(c) 5
(d) 6
Ans: (c)
Sol: Total 5 splitting will occur during 10 successive insertions
 Let's take 10 successive key values as {1 ,2 ,3 , …10} which can cause maximum possible splits.

Pervious Year question: B Tree | Programming and Data Structures - Computer Science Engineering (CSE)Pervious Year question: B Tree | Programming and Data Structures - Computer Science Engineering (CSE)
Q2: Consider the following 2-3-4 tree (i.e., B-tree with a minimum degree of two) in which each data item is a letter. The usual alphabetical ordering of letters is used in constructing the tree  (2003)
Pervious Year question: B Tree | Programming and Data Structures - Computer Science Engineering (CSE)

What is the result of inserting G in the above tree ?

Pervious Year question: B Tree | Programming and Data Structures - Computer Science Engineering (CSE)(a) A
(b) B
(c) C
(d) None of the above
Ans: (b)
Sol: Once we add G , the leaf node becomes B G H I , since we can have only 3 keys. the node has to split at G or H , and or will be added to parent node.
Since P is the parent node in options and 2 , its evident the 3rd element i.e. H should be selected for splitting (because after adding any key from the leftmost child node, P becomes the 3rd element in the node)
 Now parent node becomes H L P U , select P as for splitting, and you get option B.

Q3:  Choose the correct alternatives (more than one may be correct) and write the corresponding letters only:
 A 2-3 tree is such that a. All internal nodes have either 2 or 3 children b. All paths from root to the leaves have the same length.
The number of internal nodes of a 2-3 tree having 9 leaves could be  (1992)

(a) 4
(b) 5
(c) 6
(d) 7
Ans: (a, d)
Sol:
 4 → When each leaf has child. So 9 / 3 = 3 Internal nodes, Then one internal node those internal nodes.
 7 → When each leaf has 2 child  & one leaf out of 4 get 3 child.  Ex → 8 / 4 = 2 child per internal node. Then one of that internal node get extra third child. Then 2 internal nodes to connect these 4 .Then 1 internal node to connect this 2 . So 4+2+1=7

The document Pervious Year question: B Tree | Programming and Data Structures - Computer Science Engineering (CSE) is a part of the Computer Science Engineering (CSE) Course Programming and Data Structures.
All you need of Computer Science Engineering (CSE) at this link: Computer Science Engineering (CSE)
119 docs|30 tests

Top Courses for Computer Science Engineering (CSE)

FAQs on Pervious Year question: B Tree - Programming and Data Structures - Computer Science Engineering (CSE)

1. What is a B tree in computer science engineering?
Ans. A B tree is a data structure used in computer science engineering for organizing and storing data in a sorted manner. It is a balanced tree data structure that allows for efficient searching, insertion, and deletion operations.
2. How does a B tree differ from a binary search tree?
Ans. Unlike a binary search tree, a B tree allows for multiple child nodes per parent node, making it more suitable for storing large amounts of data on disk and reducing the number of disk accesses required for operations.
3. What is the significance of the term 'B' in B tree?
Ans. The term 'B' in B tree stands for Bayer, who co-invented the data structure with McCreight. It signifies the balance property of the tree, where each node has a specified range of child nodes to maintain a balanced structure.
4. How is the height of a B tree related to the number of keys?
Ans. The height of a B tree is directly related to the number of keys stored in the tree. As the number of keys increases, the height of the tree increases as well, but it is kept balanced to ensure efficient operations.
5. What are the advantages of using a B tree in computer science engineering?
Ans. Some advantages of using a B tree include efficient disk operations, balanced structure for optimal search performance, and support for large datasets. It is commonly used in database systems and file systems for its scalability and efficiency.
119 docs|30 tests
Download as PDF
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

study material

,

Viva Questions

,

Pervious Year question: B Tree | Programming and Data Structures - Computer Science Engineering (CSE)

,

MCQs

,

video lectures

,

ppt

,

Summary

,

Objective type Questions

,

Exam

,

Semester Notes

,

Pervious Year question: B Tree | Programming and Data Structures - Computer Science Engineering (CSE)

,

practice quizzes

,

Important questions

,

past year papers

,

mock tests for examination

,

Previous Year Questions with Solutions

,

Free

,

shortcuts and tricks

,

Sample Paper

,

Pervious Year question: B Tree | Programming and Data Structures - Computer Science Engineering (CSE)

,

Extra Questions

,

pdf

;