Auxiliary space requirement of cocktail sort is _____________
(a) O(n)
(b) O(log n)
(c) O(1)
(d) O(n^2)
I have been asked this question in an internship interview.
This intriguing question originated from Sorting topic in chapter Sorting of Data Structures & Algorithms II