Multiple choice

Bubble sort's average 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

Bubble sort has O(n²) average time complexity because in the average case, it requires multiple passes through the array. For n elements, it makes approximately n²/2 comparisons and swaps in the average scenario.