Complexity Of Bubble Sort..???
-
O(n)
-
O(log n)
-
O(n^2)
-
O(n log n)
C
Correct answer
Explanation
Bubble Sort has a time complexity of O(n^2) in both average and worst cases because it uses nested loops - each element may need to be compared with every other element. In the best case (already sorted), it can be O(n) with optimization, but its standard complexity is quadratic. Option A is for linear algorithms, B for logarithmic, and D for efficient sorts like merge sort.