1.

In what time can a 2-d tree be constructed?(a) O(N)(b) O(N log N)(c) O(N^2)(d) O(M log N)My enquiry is from Trees topic in portion Trees of Data Structures & Algorithms IThis question was posed to me during a job interview.

Answer»

The correct answer is (b) O(N LOG N)

Easy explanation - A PERFECTLY balanced 2-d tree can be CONSTRUCTED in O(N log N) TIME. This value is computed mathematically.



Discussion

No Comment Found

Related InterviewSolutions