## NPTEL Data Structure and Algorithms using Java Week 6 Assignment Answers 2024

1. Which of the following is FALSE with respect to complexity of Binary Search Tree?

a. Complexity of Searching in a Binary Search Tree in worst case is O(n)

b. Complexity of Searching in a Binary Search Tree in best case is O(1)

c. Complexity of Searching in a Binary Search Tree in worst case is O(nlog_{2}n)

d. Complexity of Searching in a Binary Search Tree in average case id O(log_{2}n)

Answer :-For Answers Click Here

2. Identify the type of tree in the given figure below.

a. Complete Binary Tree

b. Fully Binary Tree

c. Skewed Binary Tree

d. not a tree

Answer :-For Answers Click Here

3. Choose the incorrect statement from the given options.

a. In any binary tree, maximum number of nodes on level l is 2^{l} , where l ≥ 0.

b. Maximum number of nodes possible in a binary tree of height h is 2^{h} + 1.

c. Maximum number of nodes possible in a binary tree of height h is 2^{h} – 1.

d. Minimum number of nodes possible in a binary tree of height h is h.

Answer :-For Answers Click Here

4. What is/are the possible ways of Binary tree representation?

a. Using only array

b. Using only a linked list structure

c. Using either an Array or Linked list structure

d. A special binary tree data structure is needed

there is no other way

Answer :-

5. Which of the following is/are a major operation on a binary tree?

a. Traversal

b. Insertion

c. Deletion

d. Peek

Answer :-

6. What would be the outcome of performing a post-order binary tree traversal on the provided tree?

a. G D E B A C F

b. G D E B F C A

c. A B D G E C F

d. G D E B F A C

Answer :-For Answers Click Here

7. Which of the following statements is/are True in the context of the Binary Search Tree?

a. The nodes which have the same parent are called siblings

b. Minimum number of children that is possible for a node is known as the degree of a node.

c. The node which is at the end and which does not have any child is called the leaf node.

d. The root is a specially designated node that has no parent

Answer :-

8. Which of the following is/are a Binary Search Tree?

Answer :-

9. Which of the following is False in the case of Binary Search Tree?

a. Inorder traversal on a BST gives the data in ascending order

b. Inorder traversal on a BST gives the data in no particular order

c. the minimum value is at the left-most node

d. the maximum value is at the right-most node.

Answer :-

10. Which of the following is/are True in the case of different types of Binary Trees?

a. A binary tree is a full binary tree, if it contains the maximum possible number of nodes in all levels.

b. A binary tree is said to be a complete binary tree, if all its levels, except possibly the last level, have the maximum number of possible nodes, and all the nodes at the last level appear as far left as possible.

c. A binary tree is said to be a skewed binary tree, if all its levels, all nodes contain only one child .

d. A binary tree is said to be a complete binary tree, if all its levels, except possibly the last level, have the maximum number of possible nodes, and the nodes at the last level may appear anywhere it is possible.

Answer :-For Answers Click Here