Data Structures and Algorithms
Assignment – 1.1
                                        KEY
This assignment contains 10 questions covering Trees, Terminologies, Types,
Properties, Balanced binary tree, Binary search tree, Traversal and problems
related to the above concepts.
                                  Tell yourself, “YES I CAN”.
************************************* All the Best ***********************************
1.    A binary search tree is generated by inserting following elements:
      52,15,61,5,20,58,91,3,8,37,60,24
The number of nodes in the right sub tree and left sub tree are
A.(4,7)
B.(7,4)
C.(8,3)
D.(3,8)
2.     A binary tree in which every non-leaf node has non-empty left and right subtrees
is called a strict binary tree. Such a tree with 10 leaves
a. Cannot have more than 19 nodes            b. has exactly 19 nodes
c. has exactly 17 nodes                      d. Cannot have more than 17 nodes
3.    The depth of a binary tree with “ n“ nodes is ______________
a. [log2(n+1)] – 1                                 b. log2 (n)
c. [log2(n-1)] + 1                                 d. [log2 (n)] +1
4.    The possible number of binary trees with 5 nodes is____________
a. 172                    b. 48        c. 128                    d. 42
5.   Let T be a BST with 15 nodes. The minimum and maximum possible heights of T
are:
NOTE: The height of a tree with a single node is 0.
a. 4 and 15 respectively                        b. 3 and 14 respectively
c. 4 and 14 respectively                        d. 3 and 15 respectively
6.      The post order traversal of a binary tree is 8,9,6,7,4,5,2,3,1
        The in order traversal of a binary tree is 8,6,9,4,7,2,5,1,3
        Then, the height of a binary tree is:
        a. 3        b. 4         c. 2           d.5
7.      Which of the following is /are correct in order traversal sequences of BST?
1) 3,5,7,8,15,19,25
2) 5,8,9,12,10,15,25
3) 2,7,10,8,14,16,20
4) 4,6,7,9,18,20,25
a. 1 & 4       b. 2 & 3          c. 2 & 4       d. 2
8.      The number of different trees possible with 8 nodes is:
a.248          b. 256            c. 258         d.260
9.      Which of the following statements is false?
a. A tree with ‘n’ nodes has ‘n-1’ edges.
b. A labelled rooted binary tree can be uniquely constructed given its pre order and
post order traversal results.
c. A complete binary tree with n internal nodes has (n+1) leaves.
d. The maximum number of nodes in a binary tree of height h is (2h+1-1)
10. A complete binary tree with ‘n’ non-leaf nodes contains_______ nodes.
a. n
b. 2n
c. 2n+1
d. 2n-1