Insertion Sort Quiz 3 - Problem 8

Your equation is again false in a comparison way. (because its a fricking sorting system and math doesnt apply like u want here. the Reason why, is that Number 1 takes the same step as "0" and adds up 9 comparisons in total / 1 for each number comparison cycle ) 9 8 7 6 5 4 3 2 1 0 (n=10) Number 0 takes 9 comparisons and takes place like followed 0 9 8 7 6 5 4 3 2 1 Number 1 takes again 9 !!! comparisons and placed like followed 0 1 9 8 7 6 5 4 3 2 Number 2 takes takes only 8 comparisons Number 3 takes takes only 7 comparisons and so on 9 takes 1 comparison

equads to your solution + 9 (45+9=54 comparisons) Its (n-1)(n)/2+(n-1) correct.



54

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

0 solutions

No explanations have been posted yet. Check back later!

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...