asked 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

answered
User Clotilde
by
7.6k points

Related questions

Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.