Which of the following sorting methods will be the best if number of swappings done, is the only measure of efficienty?
A. | Bubble sort |
B. | Selection sort |
C. | Insertion sort |
D. | Quick sort |
Answer : B Explanation : Because in selection sort algorithm we randomly access data rather than a list in which we can easily swap data which we want to swap and it takes less time. So, answer is 'B' |
|
Option: A Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. |