CommerceBinary Search TreesB Tree MCQs
Practice Binary Search TreesB Tree MCQs for competitive exams.
Binary Search TreesB Tree MCQs
Practice questions from this topic.
In a full binary tree if number of internal nodes is I, then number of nodes N are?
- A. N = 2*I
- B. N = I + 1
- C. N = I - 1
- D. N = 2*I + 1
Correct Answer: D
What is a threaded binary tree traversal?
- A. a binary tree traversal using stacks
- B. a binary tree traversal using queues
- C. a binary tree traversal using stacks and queues
- D. a binary tree traversal without using stacks and queues
Correct Answer: D
The minimum height of self balancing binary search tree with n nodes is . . . . . . . .
- A. log 2 (n)
- B. n
- C. 2n + 1
- D. 2n - 1
Correct Answer: A
Is mathematical randomized tree can be generated using beta distribution.
- A. True
- B. False
Correct Answer: A
Which of the below diagram is following AVL tree property?
- A. only i
- B. both i and ii
- C. only ii
- D. i is not a binary search tree
Correct Answer: C
What may be the psuedo code for finding the size of a tree?
- A. find_size(root_node–>left_node) + 1 + find_size(root_node–>right_node)
- B. find_size(root_node–>left_node) + find_size(root_node–>right_node)
- C. find_size(root_node–>right_node) – 1
- D. find_size(root_node–>left_node + 1
Correct Answer: A
In the given figure, find '?'.
- A. left rotation
- B. right rotation
- C. insertion
- D. deletion
Correct Answer: B
Consider below sequences. array=60 90 10 100 40 150 90 reverse 2 to 3 array=60 10 90 100 40 150 90 reverse 3 to 6 array= 60 100 150 40 100 90 90 now printout from 1 to 6 :-- 60 100 150 40 100 90 How to achieve the above operation efficiently?
- A. use linked lists
- B. use avl trees
- C. use red-black trees
- D. use treaps (cartesian trees)
Correct Answer: D
What is the time complexity for maintaining a dynamic set of weighted trees?
- A. O (n)
- B. O (n 2 )
- C. O (log n)
- D. O (n!)
Correct Answer: C
What is the average running time of a treap?
- A. O(N)
- B. O(N log N)
- C. O(log N)
- D. O(M log N)
Correct Answer: C
Is it possible to perform a split operation on a string in the rope if the split point is in the middle of the string.
- A. True
- B. False
Correct Answer: A
After which city is tango tree named?
- A. Vatican City
- B. Buenos Aires
- C. New York
- D. California
Correct Answer: B