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 are the children for node 'w' of a complete-binary tree in an array representation?
- A. 2w and 2w+1
- B. 2+w and 2-w
- C. w+1/2 and w/2
- D. w-1/2 and w+1/2
Correct Answer: A
What is the time complexity for finding the node at x position where n is the length of the rope?
- A. O (log n)
- B. O (n!)
- C. O (n 2 )
- D. O (1)
Correct Answer: A
What are splay trees?
- A. self adjusting binary search trees
- B. self adjusting binary trees
- C. a tree with strings
- D. a tree with probability distributions
Correct Answer: A
After the insertion operation, is the resultant tree a splay tee?
- A. true
- B. false
Correct Answer: A
The pre-order and in-order are traversals of a binary tree are T M L N P O Q and L M N T O P Q. Which of following is post-order traversal of the tree?
- A. L N M O Q P T
- B. N M O P O L T
- C. L M N O P Q T
- D. O P L M N Q T
Correct Answer: A
Which property makes top tree a binary tree?
- A. Nodes as Cluster
- B. Leaves as Edges
- C. Root is Tree Itself
- D. All of the mentioned
Correct Answer: D
The number of edges from the node to the deepest leaf is called . . . . . . . . of the tree.
- A. Height
- B. Depth
- C. Length
- D. Width
Correct Answer: A
Why Red-black trees are preferred over hash tables though hash tables have constant time complexity?
- A. no they are not preferred
- B. because of resizing issues of hash table and better ordering in redblack trees
- C. because they can be implemented using trees
- D. because they are balanced
Correct Answer: B
Consider the following data and specify which one is Preorder Traversal Sequence, Inorder and Postorder sequences. S1: N, M, P, O, Q S2: N, P, Q, O, M S3: M, N, O, P, Q
- A. S1 is preorder, S2 is inorder and S3 is postorder
- B. S1 is inorder, S2 is preorder and S3 is postorder
- C. S1 is inorder, S2 is postorder and S3 is preorder
- D. S1 is postorder, S2 is inorder and S3 is preorder
Correct Answer: C
Which of the following is a self - balancing binary search tree?
- A. 2-3 tree
- B. Threaded binary tree
- C. AA tree
- D. Treap
Correct Answer: C
How many edges are present in path cluster?
- A. 2
- B. 3
- C. 6
- D. 1
Correct Answer: A
Which of the following is not a random tree?
- A. Treap
- B. Random Binary Tree
- C. Uniform Spanning Tree
- D. AVL Tree
Correct Answer: D