CommerceBinary Search TreesB Tree MCQs
Practice Binary Search TreesB Tree MCQs for competitive exams.
Binary Search TreesB Tree MCQs
Practice questions from this topic.
What must be the ideal size of array if the height of tree is 'l'?
- A. 2 l -1
- B. l-1
- C. l
- D. 2l
Correct Answer: A
In a binary search tree, which of the following traversals would print the numbers in the ascending order?
- A. Level-order traversal
- B. Pre-order traversal
- C. Post-order traversal
- D. In-order traversal
Correct Answer: D
A binary search tree contains values 7, 8, 13, 26, 35, 40, 70, 75. Which one of the following is a valid post-order sequence of the tree provided the pre-order sequence as 35, 13, 7, 8, 26, 70, 40 and 75?
- A. 7, 8, 26, 13, 75, 40, 70, 35
- B. 26, 13, 7, 8, 70, 75, 40, 35
- C. 7, 8, 13, 26, 35, 40, 70, 75
- D. 8, 7, 26, 13, 40, 75, 70, 35
Correct Answer: D
The number of edges from the root to the node is called . . . . . . . . of the tree.
- A. Height
- B. Depth
- C. Length
- D. Width
Correct Answer: B
What is the speciality about the inorder traversal of a binary search tree?
- A. It traverses in a non increasing order
- B. It traverses in an increasing order
- C. It traverses in a random fashion
- D. It traverses based on priority of the node
Correct Answer: B
What is/are the disadvantages of implementing tree using normal arrays?
- A. difficulty in knowing children nodes of a node
- B. difficult in finding the parent of a node
- C. have to know the maximum number of nodes possible before creation of trees
- D. difficult to implement
Correct Answer: C
What is the time complexity of for achieving competitive ratio by tango tree?
- A. O (log n)
- B. O (n 2 )
- C. O (n!)
- D. O (log (log n))
Correct Answer: D
General ordered tree can be encoded into binary trees.
- A. true
- B. false
Correct Answer: A
Which special balanced binary search tree is used to store the nodes of auxiliary tree?
- A. Red - Black Tree
- B. Red - Brown Tree
- C. Red - Yellow Tree
- D. Red - Tango Tree
Correct Answer: A
Which of the following graph traversals closely imitates level order traversal of a binary tree?
- A. Depth First Search
- B. Breadth First Search
- C. Depth & Breadth First Search
- D. Binary Search
Correct Answer: B
What is a full binary tree?
- A. Each node has exactly zero or two children
- B. Each node has exactly two children
- C. All the leaves are at the same level
- D. Each node has exactly one or two children
Correct Answer: A
Which of the following is not an advantage of trees?
- A. Hierarchical structure
- B. Faster search
- C. Router algorithms
- D. Undo/Redo operations in a notepad
Correct Answer: D