inversions, approached using a divide and conquer algorithm