Professional Documents
Culture Documents
Question Bank Solution CT 2
Question Bank Solution CT 2
OR
7. Draw an expression tree for the following expression : (a – 2b + 5c)2 * (4d = 6e)5
8. Differentiate between tree and graph
9. Compare Linked List and Array.
4 MARKS
1. For the following graph : (i) Give adjacency matrix representation (ii) Give adjacency list
representation
2. Construct a binary search tree for following elements : 22, 27, 14, 31, 40, 43, 44, 10, 20, 35 Show
each step of construction of BST.
3. Write an algorithm to insert a new node at the beginning of a Singly linked list. Give example
6. Draw a binary search tree for the given numbers : 50, 33, 44, 22, 77, 35, 60, 40.
7. Construct a singly linked list using data fields 21, 25, 96, 58, 74 and show procedure step-by-step
with the help of diagram start to end
8. Consider the graph given in following figure and answer given questions.
9. Show with suitable diagrams how to delete a node from singly linked list at the beginning, in
between and at the end of the list.
10. Perform Inorder, Preorder and Postorder traversal of the binary tree shown in figure below.