1.

What is the auxiliary space requirement of the quickselect algorithm?(a) O(n^2)(b) O(n)(c) O(n log n)(d) O(1)This question was addressed to me in examination.I want to ask this question from Miscellaneous topic in division Miscellaneous of Data Structures & Algorithms II

Answer»

Correct choice is (d) O(1)

Easy explanation - Quickselect algorithm requires no extra SPACE in order to calculate the DESIRED result. It PERFORMS manipulations in the given ARRAY itself so its AUXILIARY space requirement will be O(1).



Discussion

No Comment Found

Related InterviewSolutions