Skip to content
Related Articles

Related Articles

Algorithms | Sorting | Question 6

Improve Article
Save Article
  • Difficulty Level : Medium
  • Last Updated : 28 Jun, 2021
Improve Article
Save Article

Consider a situation where swap operation is very costly. Which of the following sorting algorithms should be preferred so that the number of swap operations are minimized in general?
(A) Heap Sort
(B) Selection Sort
(C) Insertion Sort
(D) Merge Sort


Answer: (B)

Explanation:

Selection sort makes O(n) swaps which is minimum among all sorting algorithms mentioned above.


Quiz of this Question

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!