Unit I
Unit I
B D
C
E F G H J K
M P
L N O
4. Identify the correct statement and give suitable illustration: U Easy
The height of a node is equal to its depth.
The height of a tree is equal to its depth.
5. Summarize the advantages of binary trees over arrays. U Easy
6. Illustrate linked and sequential representation of binary trees. Compare both representations. U Easy
7. Identify the maximum and minimum number of nodes that can be present in a Complete Binary U Easy
tree of height 3.
8. Construct the binary tree representation for the general tree given below. Ap Moderate
A
B D
C
E F G H J K
M P
L N O
9. Array implementation is suitable for which of these tree structures and Why? Ap Moderate
a. Skewed binary tree b. Binary tree c. Complete Binary tree d. Full Binary tree
10. Choose the suitable tree traversal technique for: Ap Moderate
a. Print the contents of a file directory
b. Deleting all nodes in a tree
11. Draw a binary tree if the pre-order traversal is + + a * b c * + * d e f g. Ap Moderate
12. Draw an expression tree for A*B+C*D+E. Ap Moderate
13. Each leaf of the given expression tree can either be 0 or 1. The maximum possible value of the Ap Moderate
expression represented by the tree is ___. [GATE 2014]
14. What type of Games is best represented using Game trees? Justify. Ap Moderate
15. A Chess playing application usually wins against an average human player. How is this possible? Ap Moderate
16. Build a decision tree to find the maximum of three numbers. Ap Difficult
17. Construct a min-heap using an efficient method for the given list: 1,8,6,5,3,7,4. Ap Difficult
18. Determine the minimum number of interchanges needed to convert the array 〈89, 19, 50, 17, 12, Ap Difficult
15, 2〉into a max-heap.
19. Identify the approach used to construct a heap within linear time bound and justify your answer. Ap Difficult
20. A min-heap usually permits only DeleteMin operation. Frame a strategy to delete any value from Ap Difficult
the heap.
Part B (15 marks)
1. Define Heap and state its properties. Explain the Insert and DeleteMin operations on a Heap with U Easy
algorithm and example.
2. Given the following tree, Find the U Easy
(i) Height of the Tree
(ii) Depth of the Tree
(iii) Sibling of Node H
(iv) Depth of Node M
(v) Height of Node B
(vi) Path from A to M
(vii) Length of the path from A to K
3. Construct a binary tree whose nodes in inorder and preorder are given as follows: Ap Moderate
Inorder : 10, 15, 17, 18, 20, 25, 30, 35, 38, 40, 50
Preorder: 20, 15, 10, 18, 17, 30, 25, 40, 35, 38, 50
Reason whether multiple binary trees can be constructed from the given sequences with necessary
pseudo-code for all three tree traversals.
4. Suggest suitable implementation / storage scheme for each of the following: Ap Moderate
Complete Binary Tree
Full Binary Tree
Skewed Tree
Binary Tree
General Tree
Give suitable illustrations and justification.
5. Construct the expression tree for the input: abc*+de*f+g*+ compute the solution given that a = 5, b Ap Difficult
= 3, c= 2, d = 4, e = 6, f = 7, g = 1.
6. Sort the given set of values using Heapsort techniques with necessary pseudocode Ap Difficult
19, 12, 16, 1, 4, 7, 23, 56, 32, 13, 45, 60
Part B (8 marks)
7. Construct a decision tree from the given data to decide whether to schedule a Tennis match on a U Easy
particular day.