1.

Which of the following sorting algorithm is not in place?(a) library sort(b) quick sort sort(c) heap sort(d) gnome sortThe question was asked in an interview.The origin of the question is Sorting in chapter Sorting of Data Structures & Algorithms II

Answer»

The correct option is (a) LIBRARY SORT

For EXPLANATION: Out of the given options library sort is the only algorithm which is not in place. It is because the auxiliary SPACE required by library sort is O(N).



Discussion

No Comment Found

Related InterviewSolutions