KD Tree Multiple choice Questions and Answers (MCQs)

KD Tree Multiple choice Questions and Answers (MCQs)

 Question 1 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
In what time can a 2-d tree be constructed?
 A O(N) B O(N log N) C O(N2) D O(M log N)
Question 1 Explanation:
A perfectly balanced 2-d tree can be constructed in O(N log N) time. This value is computed mathematically.

 Question 2 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Insertion into a 2-d tree is a trivial extension of insertion into a binary search tree.
 A true B false
Question 2 Explanation:
Insertion of elements in a 2-d tree is similar to that of a binary search tree. Hence, it is a trivial extension of the binary search tree.

 Question 3 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
In a two-dimensional search tree, the root is arbitrarily chosen to be?
 A even B odd C depends on subtrees D 1
Question 3 Explanation:
In a two- dimensional k-d tree (i.e.) 2-d tree, the root is arbitrarily chosen to be an odd level and it applies to all 2-d trees.

 Question 4 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the following is the simplest data structure that supports range searching?
 A Heaps B binary search trees C AA-trees D K-d trees
Question 4 Explanation:
K-d trees are the simplest data structure that supports range searching and also it achieves the respectable running time.

 Question 5 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
In a k-d tree, k originally meant?
 A number of dimensions B size of tree C length of node D weight of node
Question 5 Explanation:
Initially, 2-d trees were created. Then, 3-d trees, 4-trees etc., where k meant the number of dimensions.

There are 5 questions to complete.