9.7k views
4 votes
Could someone please help explain this problem? Thank you:)

Could someone please help explain this problem? Thank you:)-example-1
User Avhi
by
6.1k points

1 Answer

5 votes

Answer:

As you can see,

a, if the list increases n time, the number of comparisons almost increases n^2 time.

b, use the rule from part a, you can see, "1000 items" means that list increased 100 times( original list is 10), so the number of comparisons would be expected to increase 100^2 times.

Explanation:

Try it and have fun!

User Alireza Eliaderani
by
6.0k points