1.

What is the auxiliary space requirement of bogosort?(a) O(n)(b) O(1)(c) O(log n)(d) O(n log n)I had been asked this question by my school principal while I was bunking the class.Asked question is from Sorting in portion Sorting of Data Structures & Algorithms II

Answer»

Correct answer is (b) O(1)

EXPLANATION: Bogosort algorithm do not REQUIRE any extra space for SORTING the input array. Thus its AUXILIARY space requirement is O(1).



Discussion

No Comment Found

Related InterviewSolutions