Mod 4 and 5 QB
Mod 4 and 5 QB
L3
7. Write a function to
i) Find the maximum element in the binary search tree L3
ii) To search an element in the tree
8. Explain the following
i) binary search tree L2
ii) threaded binary tree
iii) strictly binary tree
iv) almost complete binary tree
9. Write a c routine to count the number of nodes in a binary search tree. L3
10. Explain array representation of binary tree and write a function to search a
L2
given element in a binary search tree using array representation.
11. Show the array representation and linked representation for the following
L2
binary tree
12. Write an expression tree for expression A/B*C*D+E. give the c function
for inorder ,preorder and post order traversals and apply the traversal L3
methods to the expression tree and give the result of traversals.
13. Draw the binary search tree for the input: L3
14 15 4 9 7 18 3 5 16 4 20 17 9
Give recursive search function to search an element in that tree
14. For any non-empty binary tree T ,if n0 is the number of leaf nodes and n2
L2
the number of nodes of degree 2 then prove that n0=n2+1
15. What is the advantage of threaded binary tree over binary tree? Explain
L3
threaded binary construction with a suitable example.
16. Write short notes on:
L2
a)binary trees b) BST trees
17. Inspect and draw a binary tree for the following Expression 3+4*(7-6)/4+3.
L3
Traverse the above generated tree using Inorder, Postorder, Preorder.
18. Describe any five applications of trees. L2
19. Apply binary search tree for the given data and show the linked list
L3
representation of the same:100,85,45,55,110,20,70,65.
20. What is threaded binary tree? Explain the right and left sub tree in threaded
L2
binary tree
21. Write a c routine to check the equality of the binary tree L3
22. Write the c routine to traversal a given tree using preorder and post order
L3
traversal
MODULE 5
1. Write an algorithm for bubble sort. Trace the algorithm for the data:
L3
30,20 ,10 ,40, 80,60 ,70
2. Explain open addressing & chaining used to handle overflows in hashing. L2
12. (a) Insert the following sequence of elements into an AVL tree, starting
with an empty tree: 10, 20, 15, 25, 30, 16, 18, 19. L3
(b) Delete 30 in the AVL tree that you got.
13. Explain Hashing Techniques in detail with examples? L2