An auxiliary recursive function that sorts the input array and returns the number of inversions in the array .
static int _mergeSort ( int [ ] arr , int [ ] temp , int left , int right ) { int mid , inv_count = 0 ; if ( right > left ) {