1.

What is the auxiliary space complexity of tree sort?(a) O(1)(b) O(n)(c) O(log n)(d) O(n log n)This question was posed to me in an internship interview.My query is from Sorting in division Sorting of Data Structures & Algorithms II

Answer»

Correct answer is (b) O(N)

The best I can explain: TREE sort requires auxiliary SPACE for maintaining a binary search tree. So the auxiliary space COMPLEXITY of tree sort is O(n).



Discussion

No Comment Found

Related InterviewSolutions