I have written a mergesort(divide and conquer) algorithm and I want to use the following arrays to test if the inversion works efficiently..
So, i would just want to confirm the inversion for each of the following arrays .
1. {10,2,3,22,33,7,4,1,2} = 13
2. {4,5,6,1,2,3} = 9
3. {1,20,6,4,5} = 5
4. {3,1,2,0,4} = 5
are all these correct? I do know a question similar has been asked but I just want to confirm if my calculation was correct. with that, I can test my algorithm.Also, this is not an homework. I just want to be so so sure that I have the write inversion count so that i can test it against my code..