What is the worst-case time complexity of insertion sort ?
2026
What is the worst-case time complexity of insertion sort ?
- A.
O(n)
- B.
O(n log n)
- C.
O(n^2)
- D.
O(log n)
Attempted by 253 students.
Show answer & explanation
Correct answer: C
The worst-case time complexity of insertion sort is O(n^2). This occurs when the input array is reverse sorted, requiring maximum comparisons and swaps for each element.