Question 1
Marks : +2 | -2
Pass Ratio : 100%
What is a complete binary tree?
Explanation: A binary tree, which is completely filled, with the possible exception of the bottom level, which is filled from left to right is called complete binary tree. A Tree in which each node has exactly zero or two children is called full binary tree. A Tree in which the degree of each node is 2 except leaf nodes is called perfect binary tree.
Question 2
Marks : +2 | -2
Pass Ratio : 100%
What is a full binary tree?
Explanation: A full binary tree is a tree in which each node has exactly 0 or 2 children.
Question 4
Marks : +2 | -2
Pass Ratio : 100%
Which of the following is not an advantage of trees?
Explanation: Undo/Redo operations in a notepad is an application of stack. Hierarchical structure, Faster search, Router algorithms are advantages of trees.
Question 6
Marks : +2 | -2
Pass Ratio : 100%
What is the average case time complexity for finding the height of the binary tree?
Explanation: The nodes are either a part of left sub tree or the right sub tree, so we don’t have to traverse all the nodes, this means the complexity is lesser than n, in the average case, assuming the nodes are spread evenly, the time complexity becomes O(logn).
Question 7
Marks : +2 | -2
Pass Ratio : 100%
Which of the following is incorrect with respect to binary trees?
Explanation: In a binary tree, there are atmost 2k nodes in level k and 2k-1 total number of nodes. Number of levels is at least ceil(log(N+1)).