edited by
7,981 views

5 Answers

Best answer
16 votes
16 votes
Answer is 10. All swaps are in following order:

8,7,22,9,31,5,13

8,7,9,22,31,5,13

8,7,9,22,5,31,13

8,7,9,22,5,13,31

7,8,9,22,5,13,31

7,8,9,5,22,13,31

7,8,9,5,13,22,31

7,8,5,9,13,22,31

7,5,8,9,13,22,31

5,7,8,9,13,22,31
5 votes
5 votes
if we try to simulate the array with given elements then number of swappings by applying Bubble sort  =10
0 votes
0 votes
d....
Answer:

Related questions

10 votes
10 votes
5 answers
1
sh!va asked May 7, 2017
4,903 views
Which one of the following in-place sorting algorithms needs the minimum number of swaps?Insertion SortQuick SortHeap SortSelection Sort
14 votes
14 votes
3 answers
2
sh!va asked May 7, 2017
4,245 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,430 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