The complexity of Bubble sort algorithm is
A. O(n)
B. O(log n)
C. O(n2)
D. O(n log n)
Answer:A
The complexity of Bubble sort algorithm is
A. O(n) B. O(log n) C. O(n2) D. O(n log n)
Explanation: Bubble sort, is a simple sorting algorithm that works by repeatedly stepping through the list to be sorted, comparing each pair of adjacent items and swapping them if they are in the wrong order.