McqMate

Q. |
## Which of the following is the biggest advantage of selection sort? |

A. | its has low time complexity |

B. | it has low space complexity |

C. | it is easy to implement |

D. | it requires only n swaps under any condition |

Answer» D. it requires only n swaps under any condition | |

Explanation: selection sort works by obtaining least value element in each iteration and then swapping it with the current index. so it will take n swaps under any condition which will be useful when memory write operation is expensive. |

933

0

Do you find this helpful?

8

View all MCQs in

Design and Analysis of AlgorithmsNo comments yet

- Recursive selection sort is a comparison based sort.
- What is the number of swaps required to sort the array arr={5,3,2,4,1} using recursive selection sort?
- Which of the following sorting algorithms is used along with quick sort to sort the sub arrays?
- What will be the recurrence relation of the code of recursive selection sort?
- What will be the best case time complexity of recursive selection sort?
- What is the average case time complexity of recursive selection sort?
- What is the bidirectional variant of selection sort?
- Under what case of Master’s theorem will the recurrence relation of merge sort fall?
- Under what case of Master’s theorem will the recurrence relation of stooge sort fall?
- Quick sort follows Divide-and-Conquer strategy.