Question:

Consider following statements about time complexity :
A. Merge sort and heap sort have $O(n \log n)$ in worst case

B. Quick sort has $O(n \log n)$ in average case and $O(n^2)$ in worst case

C. Insertion sort is faster than merge sort for large $n$

D. Bubble sort is stable

E. Selection sort has fewer swap than insertion sort

Choose the correct answer from the options given below :

Show Hint

Selection sort is the best choice when the cost of "swapping" memory is very high, because it minimizes the total number of swaps.
Updated On: Jun 6, 2026
  • B, C, E only
  • A, C, D only
  • A, B, C only
  • A, B, D, E only
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

We analyze the properties of various sorting algorithms. 1. Evaluating A, B, and C:
A: Both Merge and Heap sort are guaranteed $O(n \log n)$ even in the worst case. This is correct.
B: Quick sort's worst-case occurs with poor pivot choices (like sorted arrays). Average case is $O(n \log n)$. This is correct.
C: For large $n$, $O(n \log n)$ (Merge Sort) is always faster than $O(n^2)$ (Insertion Sort). This is incorrect. 2. Evaluating D and E:
D: Bubble sort does not swap equal elements, preserving their relative order. It is stable. This is correct.
E: Selection sort performs $O(n)$ swaps in total, whereas Insertion sort can perform $O(n^2)$ swaps/shifts. This is correct. Conclusion: Statements A, B, D, and E are correct.
Was this answer helpful?
0
0

Top CUET PG Data Science A.I Cyber Security and Computer Sci. Questions

View More Questions

Top CUET PG Algorithm Questions

View More Questions