4,840 views
10 votes
10 votes

Which one of the following in-place sorting algorithms needs the minimum number of swaps?

  1. Insertion Sort
  2. Quick Sort
  3. Heap Sort
  4. Selection Sort

5 Answers

Best answer
9 votes
9 votes
Selection Sort is best sorting algorithm in terms of minimum no. of swap = O(n)
selected by
0 votes
0 votes
In insertion sort there is no swapping....so 0 swapping in insertion sort...so i think answer should be insertion sort.
Answer:

Related questions

9 votes
9 votes
5 answers
1
sh!va asked May 7, 2017
7,785 views
The number of swappings needed to sort the numbers $8 , 22, 7, 9, 31, 5, 13$ in ascending order using bubble sort is$11$$12$$13$$10$
14 votes
14 votes
3 answers
2
sh!va asked May 7, 2017
4,214 views
The time complexity of computing the transitive closure of a binary relation on a set of $n$ elements is known to bea. $O(n\log n)$b. $O\left( n^{3/2}\right)$c. $O( n^3 )...
5 votes
5 votes
3 answers
3
sh!va asked May 7, 2017
4,385 views
Which of the following algorithms solves the all pair shortest path problem?Prim's algorithmDijkstra's algorithmBellman ford algorithmFloyd warshalls algorithm
29 votes
29 votes
7 answers
4