1.

Auxiliary space requirement of odd-even sort is ___________(a) O(n)(b) O(log n)(c) O(1)(d) O(n^2)I have been asked this question in my homework.My question is taken from Sorting in chapter Sorting of Data Structures & Algorithms II

Answer»

The correct choice is (c) O(1)

The explanation is: In odd-even SORT manipulation is DONE on the input ARRAY itself. So no extra space is required to perform SORTING. Thus it requires constant AUXILIARY space.



Discussion

No Comment Found

Related InterviewSolutions