Which of the below given sorting techniques has highest best-case runtime…
2024
Which of the below given sorting techniques has highest best-case runtime complexity
- A.
quick sort
- B.
selection sort
- C.
insertion sort
- D.
bubble sort
Attempted by 165 students.
Show answer & explanation
Correct answer: B
Answer : B
Explanation:
Best-case time complexities:
Quick Sort → O(n log n)
Selection Sort → O(n²)
Insertion Sort → O(n)
Bubble Sort → O(n) (with optimized version)
Among these, the highest best-case runtime complexity is:
Selection Sort → O(n²)
Reason:
Selection sort performs the same number of comparisons regardless of input order, so even in the best case its complexity remains O(n²).