StreakPeaked· Practice

ExamsGATETechnical

Which of the following sorting algorithms has the lowest worst-case complexity?

  1. Merge sort
  2. Bubble sort
  3. Quick sort
  4. Selection sort

Correct answer: Merge sort

Solution

Merge sort has worst-case time complexity $O(n\log n)$. Bubble sort and selection sort are $O(n^2)$ in the worst case, and quick sort can also degrade to $O(n^2)$.

Related GATE Technical questions

⚔️ Practice GATE Technical free + battle 1v1 →