Find out the big-O running time (tight bound) of bubble sort. Illustrtae your derivation. Count comparisons as critical operation.
Bubble sort pseudocode:
Bubblesort(A,n)
//A is array, n items to sort
For i <-- n-1 to i
For j <-- 1 to i
If A[j] < A[j+1]
Swap(A[j],A[j+1])