For Bubble Sort with n elements, we need to repeat the process for times.

In bubble sort algorithm, the largest element is moved to the end of the array in each .

The average and worst-case time complexity of bubble sort algorithm is .