Which of the following is the Average Case Time Complexity fo the Bubble sort algorithm?
Show answer
Correct answer A
Bubble Sort repeatedly compares and swaps adjacent elements until the array is sorted. Average case involves roughly n(n-1)/2 comparisons, which gives O(n²) time complexity. Best case: O(n) if the array is already sorted (with optimized check). Worst case: O(n²) when the array is reverse sorted.