Multiple choice

Insertion sort's worstcase time complexity is

  1. O(n2)

  2. O(nlogn)

  3. O(logn)

  4. O(n)

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Insertion sort's worst case occurs with reverse-sorted input, where each new element must shift through all existing sorted elements, requiring O(n²) comparisons and shifts.