Adding Inversions using merge sort