The complexity of Bubble sort algorithm is
A
O(n)
B
O (logn)
C
O (n2)
D
O (n log n)
Correct Answer: O(n)
Bubble sort has a worst - case and average complexity of О(n2), where n is the number of items being sorted. Most practical sorting algorithms have substantially better worst - case or average complexity, often O(n log n). When the list is already sorted (best - case), the complexity of bubble sort is only O(n). Class: Sorting algorithm Data structure: Array