CommerceBinary Search TreesB Tree MCQs
Practice Binary Search TreesB Tree MCQs for competitive exams.
Binary Search TreesB Tree MCQs
Practice questions from this topic.
The size value of various nodes in a weight balanced tree are leaf - zero internal node - size of it's two children is this true?
- A. true
- B. false
Correct Answer: A
What is the possible number of binary trees that can be created with 3 nodes, giving the sequence N, M, L when traversed in post-order.
- A. 15
- B. 3
- C. 5
- D. 8
Correct Answer: C
What operation does the following diagram depict?
- A. inserting a leaf node
- B. inserting an internal node
- C. deleting a node with 0 or 1 child
- D. deleting a node with 2 children
Correct Answer: C
Binary tree sort implemented using a self balancing binary search tree takes O(n log n) time in the worst case but still it is slower than merge sort.
- A. True
- B. False
Correct Answer: A
The steps for finding post-order traversal are traverse the right subtree, traverse the left subtree or visit the current node.
- A. True
- B. False
Correct Answer: B
The following given tree is an example for?
- A. Binary tree
- B. Binary search tree
- C. Fibonacci tree
- D. AVL tree
Correct Answer: A
What is a splay operation?
- A. moving parent node to down of child
- B. moving a node to root
- C. moving root to leaf
- D. removing leaf node
Correct Answer: B
Which of the following property of splay tree is correct?
- A. it holds probability usage of the respective sub trees
- B. any sequence of j operations starting from an empty tree with h nodes atmost, takes O(jlogh) time complexity
- C. sequence of operations with h nodes can take O(logh) time complexity
- D. splay trees are unstable trees
Correct Answer: B
What are the conditions for an optimal binary search tree and what is its advantage?
- A. The tree should not be modified and you should know how often the keys are accessed, it improves the lookup cost
- B. You should know the frequency of access of the keys, improves the lookup time
- C. The tree can be modified and you should know the number of elements in the tree before hand, it improves the deletion time
- D. The tree should be just modified and improves the lookup time
Correct Answer: A
A binary tree is balanced if the difference between left and right subtree of every node is not more than . . . . . . . .
- A. 1
- B. 3
- C. 2
- D. 0
Correct Answer: A
Which type of binary search tree is imitated for construction of tango tree?
- A. Complete Binary Search Tree
- B. Perfect Binary Search Tree
- C. Balanced Binary Search Tree
- D. Degenerate Binary Search Tree
Correct Answer: A
Consider the following data. The pre order traversal of a binary tree is A, B, E, C, D. The in order traversal of the same binary tree is B, E, A, D, C. The level order sequence for the binary tree is . . . . . . . .
- A. A, C, D, B, E
- B. A, B, C, D, E
- C. A, B, C, E, D
- D. D, B, E, A, C
Correct Answer: C