Interchange sort - comparisons and swaps? Please help!?

Naomi

New member
Interchange sort of 6, 8, 4, 3, 1, 9, 8, 7, 12, 9 - I have done it seven times and have got 80 comparisons, when I know it should only be 45 and I've got far more swaps than it should be
I can't see where I'm going wrong at all :(
Could someone help me with this?
 
Back
Top