1.

Which of the following sorting algorithm is not in-place?(a) insertion sort(b) tim sort(c) quick sort(d) intro sortThe question was asked in class test.My question is based upon Sorting topic in portion Sorting of Data Structures & Algorithms II

Answer»

Right CHOICE is (B) tim sort

Explanation: Tim sort is not an in-place sorting algorithm as it REQUIRES auxiliary space. It is because it requires to merge sorted runs which requires a THIRD array of the SIZE equal to the sum of the two runs.



Discussion

No Comment Found

Related InterviewSolutions