85.7k views
5 votes
Assume you use Bubble Sort to sort a list with 15 elements (i.e.n= 9). Exactly howmany comparisons do you use (in the worst case)?

1 Answer

4 votes

Answer:

Worst case is 55 but it really does depend on the numbers

Step-by-step explanation:

1/2n squared -1

So that would be 7.5 squared -1

User Clotilde
by
4.4k points