1.

Which of the following is not an exchange sort?(a) Bubble Sort(b) Quick Sort(c) Partition-exchange Sort(d) Insertion SortThe question was asked in quiz.Question is from Insertion sort topic in chapter Sorting of Data Structures & Algorithms II

Answer»

Right answer is (d) Insertion Sort

Easiest explanation - In Exchange sorts, we compare each element of an ARRAY and SWAP those elements that are not in their PROPER position. BUBBLE Sort and Quick Sort are exchange sorts. Quick Sort is ALSO called as Partition-exchange Sort. Insertion sort is not an exchange sort.



Discussion

No Comment Found

Related InterviewSolutions