What is the worst case of finding the nearest neighbour?

Category: QuestionsWhat is the worst case of finding the nearest neighbour?
Editor">Editor Staff asked 5 months ago

What is the worst case of finding the nearest neighbour?
 
(a) O(N)
 
(b) O(N log N)
 
(c) O( log N)
 
(d) O(N^3)
 
Enquiry is from Trees topic in division Trees of Data Structures & Algorithms I
 
The question was asked during an interview.

1 Answers
Editor">Editor Staff answered 5 months ago

Correct answer is (a) O(N)
 
The explanation is: The worst case analysis of finding the nearest neighbour in a k-d tree is mathematically found to be O(N).


Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17
Articles: 40702