File Management
File Management
Part – A
S.No. Question Blooms Level Level of Difficulty
[Easy/
Moderate /
Question CO
Difficult]
s
Part A
1. Define Binary Search tree and list its operations. U Ap Easy
2. Construct the binary search tree for following data 12,32,35,2,1,69,55,39,21,49,52,56. Ap Ap Moderate
3. Can a Binary Search tree contain duplicate values? Justify. Ap Ap Difficult
4. List the various cases that can arise when deleting a value from a Binary Search Tree Ap
U Easy
along with the strategy to be followed.
5. Distinguish between binary tree and binary search tree. U Ap Easy
6. Deleting a value from a Binary Search tree may involve multiple operations. Propose a Ap
Ap Difficult
viable alternate given that the number of deletions is small.
7. Develop a recursive algorithm for finding the maximum value in a Binary Search Tree. Ap Ap Difficult
8. Write a pseudocode to print the elements of BST in ascending order Ap Ap Moderate
9. State the properties of a kd tree. U Ap Easy
10. Define cutting dimension in kd tree. R Ap Easy
11. State the applications of kd tree. U Ap Easy
12. Construct a k-d tree for the following input: (6, 1), (5, 5), (9, 6), (3, 6), (4, 9). Ap Ap Moderate
13. Give the need for opting for a B-Tree U Ap Moderate
14. State the properties of a B –Tree. U Ap Easy
15. State the applications of B tree. U Ap Easy
16. Calculate the minimum and maximum number of keys and children that a B tree of Ap
Ap Moderate
order 5 can have.
17. Give the time complexity for insertion and search in a B tree U Ap Easy
18. Define Tries. R Ap Moderate
19. Define degree and height of a trie R Ap Easy
20. List out the applications of tries. U Ap Easy
Part B
15 marks
Construct a BST for the following sequence of numbers 45, 36, 76, 23, 89, 115, 98, 39,
1. 41, 56. Delete the values 115, 23 and 45. Write and explain the algorithms for Insert Ap Ap Moderate
and Delete operations.
Construct a BST for the following sequence of numbers 15, 6, 18,3,7, 17,20, 2, 4 , 13, 9.
2. Write the algorithm for constructing a BST and the traversal suitable for printing the Ap Ap Easy
values in ascending order.
Discriminate B and B+ trees. Given that a B-Tree can store between 2 to 4 keys in each
3. node, construct a B tree by inserting the keys P, E, H, V, W, R, S, A, F, U and B. Delete Ap Ap Moderate
the values H, R, E and U.
Construct 2-d tree from the keys (30,40),(5,25),(10,12),(70,70),(50,30),(35,45), (60,
4. 30). Identify the points in the range: x: 30 to 40 and y: 20 to 40.Write and explain the Ap Ap Hard
algorithms for Insert and Range Search.
5. Construct a B-Tree of order 5 from the values 1, 12, 8, 2, 25, 6, 14, 28, 17, 7, 52, 16, 48,
Ap Ap Easy
68, 3, 26, 29, 53, 55, 45, 67. Delete 6, 53, 1
6. Construct a Trie for the following words: ‘she’, sells, sea, shells, the, shore and write Ap Ap Hard
pseudo-code for insert and search operations on a Trie.
8 Marks
In the given tree, perform
i) delete 4,
ii) delete 5 and
iii) delete 2 and Explain the various cases of deleting a node in BST.
1. Ap Ap Easy
2. Ap Ap Easy
Insert the following values to the existing tree 100, 50, 9, 5, 70, 90 and 87. Traverse
the tree in In-order.
3. Easy
Write the algorithm for searching a key in BST. Trace the path for searching 3 in the
given tree.
4. Construct a 2-D tree from the points A(4, 2) B(3 , 7) C(6 , 5) D(2 , 4) E(7 , 3) F(1 , 9) G(8 , 6)
Ap Ap Hard
H(8 , 2). Determine all points in the range (3 , 4) and (7 , 8) .
5. Write and explain the algorithm for Insertion in a B-Tree. Construct a B-tree of order 3
Ap Ap Moderate
by inserting the values: 92, 24, 6, 7, 11, 8, 22, 4, 5, and 16.
6. Construct a B-Tree of order 3 from the values M, Q, A, N, P, W, X, T, G, E, J. Delete T, N, A, X. Ap Ap Hard
7. Construct a B-Tree of order 4 from the values 3, 21, 5, 9, 1, 13, 2, 7, 10, 12, 4, 8. Delete 2, 21, 10,
Ap Ap Moderate
3.
8. Ap Ap Moderate
Perform deletion of node (50,60) in the given KD-Tree and explain the procedure for deletion
in KD tree.
7 Marks
1. Show the result of inserting the values 55 63 31 17 22 40 into an empty BST Ap Ap Easy
Delete the values 3, 9 and 5 from the given BST
2. Ap Ap Easy
3. Construct a 2-D tree from the points A(40, 45) B(15 , 70) C(70 , 10) D(69 , 75) E(80 , 8) F(42 ,
Ap Ap Hard
50) G(85 , 90) H(25 , 30) and find the minimum node in X dimension.
4. Devise a method to sort numbers by constructing a Binary Search Tree. Explain the
Ap Ap Moderate
approach for sorting the numbers: 56, 75, 19, 63, 8, 62, 4, 84, 12, 60, 25.
5. Construct a Trie from the words - bear, be, bell, sell, self, see, seen. Delete be , seen. Ap Ap Moderate
Devise a method to find the minimum element in a BST. Trace the steps for finding minimum
element in the following tree.
6. Ap Ap Moderate
7. Construct a Trie to insert the following keys - Instant, Internal and Internet. Give the order and
Ap Ap Easy
degree of the Trie.
8. With suitable example discuss the various case of deleting a node in a Trie. U Ap Hard