Sorting algorithms which needs the minimum number of swaps - Algorithms - Selection sort
Q. From the following sorting algorithms which algorithm needs the minimum number of swaps- Published on 16 Jun 15a. Bubble sort
b. Quick sort
c. Merge sort
d. Selection sort
ANSWER: Selection sort
First find the smallest in the array and exchange it with the element in the first position, then find the second smallest element and exchange it with the element in the second position and continue in this way until the entire array is sorted. Hence, we say that selection sort takes the minimum number of swaps.