CommerceBinary Search TreesB Tree MCQs
Practice Binary Search TreesB Tree MCQs for competitive exams.
Binary Search TreesB Tree MCQs
Practice questions from this topic.
Which of the following is the correct definition for a horizontal link?
- A. connection between node and a child of equal levels
- B. connection between two nodes
- C. connection between two child nodes
- D. connection between root node and leaf node
Correct Answer: A
What are the two different operations done in an AA-Tree?
- A. shift and color
- B. skew and split
- C. zig and zag
- D. enqueue and dequeue
Correct Answer: B
What is the average case time complexity for finding the height of the binary tree?
- A. h = O(loglogn)
- B. h = O(nlogn)
- C. h = O(n)
- D. h = O(log n)
Correct Answer: D
For the tree below, write the in-order traversal.
- A. 6, 2, 5, 7, 11, 2, 5, 9, 4
- B. 6, 5, 2, 11, 7, 4, 9, 5, 2
- C. 2, 7, 2, 6, 5, 11, 5, 9, 4
- D. 2, 7, 6, 5, 11, 2, 9, 5, 4
Correct Answer: A
Which type of binary tree does rope require to perform basic operations?
- A. Unbalanced
- B. Balanced
- C. Complete
- D. Full
Correct Answer: B
An AVL tree is a self - balancing binary search tree, in which the heights of the two child sub trees of any node differ by . . . . . . . .
- A. At least one
- B. At most one
- C. Two
- D. At most two
Correct Answer: B
A treap is a combination of a tree and a heap.
- A. false
- B. true
Correct Answer: B
What is the time complexity for searching k+1 auxiliary trees?
- A. k+2 O (log (log n))
- B. k+1 O (log n)
- C. K+2 O (log n)
- D. k+1 O (log (log n))
Correct Answer: D
Which node has the lowest priority in a treap?
- A. root node
- B. leaf node
- C. null node
- D. centre node
Correct Answer: A
Which of the following is incorrect with respect to binary trees?
- A. Let T be a binary tree. For every k ≥ 0, there are no more than 2k nodes in level k
- B. Let T be a binary tree with λ levels. Then T has no more than 2 λ – 1 nodes
- C. Let T be a binary tree with N nodes. Then the number of levels is at least ceil(log (N + 1))
- D. Let T be a binary tree with N nodes. Then the number of levels is at least floor(log (N + 1))
Correct Answer: D
How can you save memory when storing color information in Red-Black tree?
- A. using least significant bit of one of the pointers in the node for color information
- B. using another array with colors of each node
- C. storing color information in the node structure
- D. using negative and positive numbering
Correct Answer: A
What is the prime condition of AA-tree which makes it simpler than a red-black tree?
- A. Only right children can be red
- B. Only left children can be red
- C. Right children should strictly be black
- D. There should be no left children
Correct Answer: A